mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
review feedback
This commit is contained in:
parent
d9c516cdeb
commit
bf8ed1caa2
1 changed files with 6 additions and 5 deletions
|
|
@ -75,13 +75,14 @@ func (r *simCallResult) MarshalJSON() ([]byte, error) {
|
|||
|
||||
// simBlockResult is the result of a simulated block.
|
||||
type simBlockResult struct {
|
||||
sim *simulator
|
||||
Block *types.Block
|
||||
Calls []simCallResult
|
||||
fullTx bool
|
||||
chainConfig *params.ChainConfig
|
||||
Block *types.Block
|
||||
Calls []simCallResult
|
||||
}
|
||||
|
||||
func (r *simBlockResult) MarshalJSON() ([]byte, error) {
|
||||
blockData := RPCMarshalBlock(r.Block, true, r.sim.fullTx, r.sim.chainConfig)
|
||||
blockData := RPCMarshalBlock(r.Block, true, r.fullTx, r.chainConfig)
|
||||
blockData["calls"] = r.Calls
|
||||
return json.Marshal(blockData)
|
||||
}
|
||||
|
|
@ -148,7 +149,7 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]*simBlo
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results[bi] = &simBlockResult{sim: sim, Block: result, Calls: callResults}
|
||||
results[bi] = &simBlockResult{fullTx: sim.fullTx, chainConfig: sim.chainConfig, Block: result, Calls: callResults}
|
||||
parent = result.Header()
|
||||
prevHeaders = append(prevHeaders, parent)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue