Skip to content

Commit

Permalink
add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Nov 13, 2023
1 parent fbf55a7 commit 8d71e84
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions action/protocol/execution/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func ExecuteContract(
sharedGasFee, totalGasFee *big.Int
)
if ps.featureCtx.SharedGasWithDapp && sgd != nil {
// TODO: sgd is whether nil should be checked in processSGD
receiver, sharedGas, err = processSGD(ctx, sm, execution, consumedGas, sgd)
if err != nil {
return nil, nil, errors.Wrap(err, "failed to process Sharing of Gas-fee with DApps")
Expand Down Expand Up @@ -638,6 +639,7 @@ func SimulateExecution(
)

ctx = protocol.WithFeatureCtx(ctx)
// TODO: move the logic out of SimulateExecution
helperCtx := mustGetHelperCtx(ctx)
ctx = WithHelperCtx(ctx, HelperContext{
GetBlockHash: helperCtx.GetBlockHash,
Expand Down
1 change: 1 addition & 0 deletions action/protocol/poll/consortium.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ func getContractReaderForGenesisStates(ctx context.Context, sm protocol.StateMan
return nil, err
}

// TODO: move to the caller, then getBlockHash param can be removed
ctx = evm.WithHelperCtx(ctx, evm.HelperContext{
GetBlockHash: getBlockHash,
})
Expand Down
1 change: 1 addition & 0 deletions api/coreservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,7 @@ func (core *coreService) Track(ctx context.Context, start time.Time, method stri
}

func (core *coreService) simulateExecution(ctx context.Context, addr address.Address, exec *action.Execution, getBlockHash evm.GetBlockHash) ([]byte, *action.Receipt, error) {
// TODO: add depositGas
ctx = evm.WithHelperCtx(ctx, evm.HelperContext{
GetBlockHash: getBlockHash,
})
Expand Down
1 change: 1 addition & 0 deletions chainservice/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ func (builder *Builder) registerRollDPoSProtocol() error {
return nil, err
}

// TODO: add depositGas
ctx = evm.WithHelperCtx(ctx, evm.HelperContext{
GetBlockHash: dao.GetBlockHash,
})
Expand Down

0 comments on commit 8d71e84

Please sign in to comment.