Skip to content

Commit 4aa7732

Browse files
committed
Fix StackExtendCommands period calculation inside check
1 parent 609b8d7 commit 4aa7732

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

contrib/core-contract-tests/tests/pox-4/pox_StackExtendAuthCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class StackExtendAuthCommand implements PoxCommand {
5050
// - The new lock period must be less than or equal to 12.
5151
const stacker = model.stackers.get(this.wallet.stxAddress)!;
5252

53-
const firstRewardCycle = stacker.firstLockedRewardCycle
53+
const firstRewardCycle = stacker.firstLockedRewardCycle < this.currentCycle
5454
? this.currentCycle
5555
: stacker.firstLockedRewardCycle;
5656
const firstExtendCycle = Math.floor(

contrib/core-contract-tests/tests/pox-4/pox_StackExtendSigCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class StackExtendSigCommand implements PoxCommand {
5050
// - The new lock period must be less than or equal to 12.
5151
const stacker = model.stackers.get(this.wallet.stxAddress)!;
5252

53-
const firstRewardCycle = stacker.firstLockedRewardCycle
53+
const firstRewardCycle = stacker.firstLockedRewardCycle < this.currentCycle
5454
? this.currentCycle
5555
: stacker.firstLockedRewardCycle;
5656
const firstExtendCycle = Math.floor(

0 commit comments

Comments
 (0)