Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove FixRewardErroCheckPosition flag
Browse files Browse the repository at this point in the history
dustinxie committed Apr 5, 2023
1 parent 0d3a165 commit 5ebd052
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions action/protocol/context.go
Original file line number Diff line number Diff line change
@@ -108,7 +108,6 @@ type (
FixGasAndNonceUpdate bool
FixUnproductiveDelegates bool
CorrectGasRefund bool
FixRewardErroCheckPosition bool
EnableWeb3Rewarding bool
SkipSystemActionNonce bool
}
@@ -245,7 +244,6 @@ func WithFeatureCtx(ctx context.Context) context.Context {
FixGasAndNonceUpdate: g.IsOkhotsk(height),
FixUnproductiveDelegates: g.IsOkhotsk(height),
CorrectGasRefund: g.IsOkhotsk(height),
FixRewardErroCheckPosition: g.IsOkhotsk(height),
EnableWeb3Rewarding: g.IsPalau(height),
SkipSystemActionNonce: g.IsPalau(height),
},
12 changes: 2 additions & 10 deletions action/protocol/rewarding/reward.go
Original file line number Diff line number Diff line change
@@ -97,11 +97,8 @@ func (p *Protocol) GrantBlockReward(
return nil, nil
}
rewardAddr, err := address.FromString(rewardAddrStr)
fCtx := protocol.MustGetFeatureCtx(ctx)
if fCtx.FixRewardErroCheckPosition {
if err != nil {
return nil, err
}
if err != nil {
return nil, err
}

a := admin{}
@@ -111,11 +108,6 @@ func (p *Protocol) GrantBlockReward(
if err := p.updateAvailableBalance(ctx, sm, a.blockReward); err != nil {
return nil, err
}
if !fCtx.FixRewardErroCheckPosition {
if err != nil {
return nil, err
}
}
if err := p.grantToAccount(ctx, sm, rewardAddr, a.blockReward); err != nil {
return nil, err
}

0 comments on commit 5ebd052

Please sign in to comment.