diff --git a/action/protocol/poll/consortium.go b/action/protocol/poll/consortium.go index 991a09d57a..dec8dc3d94 100644 --- a/action/protocol/poll/consortium.go +++ b/action/protocol/poll/consortium.go @@ -155,10 +155,6 @@ func (cc *consortiumCommittee) CreateGenesisStates(ctx context.Context, sm proto ctx = evm.WithHelperCtx(ctx, evm.HelperContext{ GetBlockHash: cc.getBlockHash, GetBlockTime: cc.getBlockTime, - DepositGasFunc: func(context.Context, protocol.StateManager, address.Address, *big.Int, *big.Int) (*action.TransactionLog, error) { - return nil, nil - }, - Sgd: nil, }) r := getContractReaderForGenesisStates(ctx, sm) cands, err := cc.readDelegatesWithContractReader(ctx, r) diff --git a/action/protocol/poll/staking_committee_test.go b/action/protocol/poll/staking_committee_test.go index 5dc94c6d15..c239132214 100644 --- a/action/protocol/poll/staking_committee_test.go +++ b/action/protocol/poll/staking_committee_test.go @@ -141,6 +141,7 @@ func initConstructStakingCommittee(ctrl *gomock.Controller) (Protocol, context.C cfg.Genesis.NativeStakingContractAddress, cfg.Genesis.NativeStakingContractCode, scoreThreshold, + func(u uint64) (time.Time, error) { return time.Time{}, nil }, ) return p, ctx, sm, r, err diff --git a/chainservice/builder.go b/chainservice/builder.go index 2bb5786256..c71cf620ac 100644 --- a/chainservice/builder.go +++ b/chainservice/builder.go @@ -622,10 +622,6 @@ func (builder *Builder) registerRollDPoSProtocol() error { } // TODO: add depositGas - // TODO: replace the fake function with a real one - getBlockTime := func(uint64) (time.Time, error) { - return time.Time{}, nil - } ctx = evm.WithHelperCtx(ctx, evm.HelperContext{ GetBlockHash: dao.GetBlockHash, GetBlockTime: getBlockTime, diff --git a/e2etest/staking_test.go b/e2etest/staking_test.go index 4eed0f2579..7611851840 100644 --- a/e2etest/staking_test.go +++ b/e2etest/staking_test.go @@ -124,9 +124,7 @@ func TestStakingContract(t *testing.T) { ctx = evm.WithHelperCtx(ctx, evm.HelperContext{ GetBlockHash: dao.GetBlockHash, - GetBlockTime: func(u uint64) (time.Time, error) { - return time.Time{}, nil - }, + GetBlockTime: fakeGetBlockTime, }) data, _, err := sf.SimulateExecution(ctx, addr, ex)