Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Nov 16, 2023
1 parent 93ffc32 commit 3da8930
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions action/protocol/poll/consortium.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions action/protocol/poll/staking_committee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions chainservice/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 1 addition & 3 deletions e2etest/staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3da8930

Please sign in to comment.