Skip to content

Commit dfd708b

Browse files
committed
remove isWeb3RewardingAction() check
1 parent 239a9a3 commit dfd708b

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

action/protocol/context.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ type (
108108
FixGasAndNonceUpdate bool
109109
FixUnproductiveDelegates bool
110110
CorrectGasRefund bool
111-
EnableWeb3Rewarding bool
112111
SkipSystemActionNonce bool
113112
}
114113

@@ -244,7 +243,6 @@ func WithFeatureCtx(ctx context.Context) context.Context {
244243
FixGasAndNonceUpdate: g.IsOkhotsk(height),
245244
FixUnproductiveDelegates: g.IsOkhotsk(height),
246245
CorrectGasRefund: g.IsOkhotsk(height),
247-
EnableWeb3Rewarding: g.IsPalau(height),
248246
SkipSystemActionNonce: g.IsPalau(height),
249247
},
250248
)

state/factory/workingset.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"sort"
1111

1212
"github.com/iotexproject/go-pkgs/hash"
13-
"github.com/iotexproject/iotex-proto/golang/iotextypes"
1413
"github.com/pkg/errors"
1514
"github.com/prometheus/client_golang/prometheus"
1615
"go.uber.org/zap"
@@ -35,8 +34,6 @@ var (
3534
},
3635
[]string{"type"},
3736
)
38-
39-
errUnsupportWeb3Rewarding = errors.New("unsupported web3 rewarding")
4037
)
4138

4239
func init() {
@@ -148,9 +145,6 @@ func (ws *workingSet) runAction(
148145
if protocol.MustGetBlockCtx(ctx).GasLimit < protocol.MustGetActionCtx(ctx).IntrinsicGas {
149146
return nil, action.ErrGasLimit
150147
}
151-
if !protocol.MustGetFeatureCtx(ctx).EnableWeb3Rewarding && isWeb3RewardingAction(elp) {
152-
return nil, errUnsupportWeb3Rewarding
153-
}
154148
// Reject execution of chainID not equal the node's chainID
155149
if err := validateChainID(ctx, elp.ChainID()); err != nil {
156150
return nil, err
@@ -481,7 +475,7 @@ func (ws *workingSet) pickAndRunActions(
481475
switch errors.Cause(err) {
482476
case nil:
483477
// do nothing
484-
case action.ErrChainID, errUnsupportWeb3Rewarding:
478+
case action.ErrChainID:
485479
continue
486480
case action.ErrGasLimit:
487481
actionIterator.PopAccount()
@@ -597,16 +591,3 @@ func (ws *workingSet) CreateBuilder(
597591
SetLogsBloom(calculateLogsBloom(ctx, ws.receipts))
598592
return blkBuilder, nil
599593
}
600-
601-
func isWeb3RewardingAction(selp action.SealedEnvelope) bool {
602-
if selp.Encoding() != uint32(iotextypes.Encoding_ETHEREUM_RLP) {
603-
return false
604-
}
605-
switch selp.Action().(type) {
606-
case *action.ClaimFromRewardingFund,
607-
*action.DepositToRewardingFund:
608-
return true
609-
default:
610-
return false
611-
}
612-
}

0 commit comments

Comments
 (0)