Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Jun 17, 2024
1 parent e56a50a commit 920381f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions action/protocol/staking/handler_stake_migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (p *Protocol) handleStakeMigrate(ctx context.Context, act *action.MigrateSt
transferLogs = append(transferLogs, tLog)

// call staking contract to stake
duration := uint64(bucket.StakedDuration / p.helperCtx.GetBlockInterval(protocol.MustGetBlockCtx(ctx).BlockHeight))
duration := uint64(bucket.StakedDuration / p.helperCtx.BlockInterval(protocol.MustGetBlockCtx(ctx).BlockHeight))
exec, err := p.constructExecution(candidate.GetIdentifier(), bucket.StakedAmount, duration, act.Nonce(), act.GasLimit(), act.GasPrice())
if err != nil {
revertSM()
Expand Down Expand Up @@ -167,7 +167,7 @@ func (p *Protocol) ConstructExecution(ctx context.Context, act *action.MigrateSt
if candidate == nil {
return nil, errCandNotExist
}
duration := uint64(bucket.StakedDuration / p.helperCtx.GetBlockInterval(protocol.MustGetBlockCtx(ctx).BlockHeight))
duration := uint64(bucket.StakedDuration / p.helperCtx.BlockInterval(protocol.MustGetBlockCtx(ctx).BlockHeight))

return p.constructExecution(candidate.GetIdentifier(), bucket.StakedAmount, duration, act.Nonce(), act.GasLimit(), act.GasPrice())
}
Expand Down
4 changes: 2 additions & 2 deletions e2etest/native_staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,8 @@ func TestCandidateTransferOwnership(t *testing.T) {
t.Run("migrate stake", func(t *testing.T) {
contractAddress := "io1dkqh5mu9djfas3xyrmzdv9frsmmytel4mp7a64"
cfg := initCfg()
cfg.Genesis.SystemStakingContractAddressV2 = contractAddress
cfg.Genesis.SystemStakingContractHeightV2 = 1
cfg.Genesis.SystemStakingContractV2Address = contractAddress
cfg.Genesis.SystemStakingContractV2Height = 1
cfg.DardanellesUpgrade.BlockInterval = time.Second * 8640
test := newE2ETest(t, cfg)
defer test.teardown()
Expand Down

0 comments on commit 920381f

Please sign in to comment.