mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-31 07:36:50 +00:00
Remove boost lock constraint (#116)
* remove boost lock constraint * make boost expiration a hard error * undo
This commit is contained in:
@@ -105,9 +105,8 @@ pub fn process_mine(accounts: &[AccountInfo], data: &[u8]) -> ProgramResult {
|
|||||||
.assert(|r| r.boost == *boost_info.key)?
|
.assert(|r| r.boost == *boost_info.key)?
|
||||||
.assert(|r| r.ts == proof.last_hash_at)?;
|
.assert(|r| r.ts == proof.last_hash_at)?;
|
||||||
|
|
||||||
// Apply multiplier if boost is unlocked and not expired.
|
// Apply multiplier if boost is not expired.
|
||||||
if boost.expires_at > t && boost.locked == 0
|
if boost.expires_at > t {
|
||||||
{
|
|
||||||
boost_reward = (base_reward as u128)
|
boost_reward = (base_reward as u128)
|
||||||
.checked_mul(boost.multiplier as u128)
|
.checked_mul(boost.multiplier as u128)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|||||||
Reference in New Issue
Block a user