mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
add empty withdrawals obj
This commit is contained in:
parent
7177f22222
commit
3daabda23f
1 changed files with 13 additions and 10 deletions
|
|
@ -53,15 +53,16 @@ type simBlock struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type simBlockResult struct {
|
type simBlockResult struct {
|
||||||
Number hexutil.Uint64 `json:"number"`
|
Number hexutil.Uint64 `json:"number"`
|
||||||
Hash common.Hash `json:"hash"`
|
Hash common.Hash `json:"hash"`
|
||||||
Time hexutil.Uint64 `json:"timestamp"`
|
Time hexutil.Uint64 `json:"timestamp"`
|
||||||
GasLimit hexutil.Uint64 `json:"gasLimit"`
|
GasLimit hexutil.Uint64 `json:"gasLimit"`
|
||||||
GasUsed hexutil.Uint64 `json:"gasUsed"`
|
GasUsed hexutil.Uint64 `json:"gasUsed"`
|
||||||
FeeRecipient common.Address `json:"feeRecipient"`
|
FeeRecipient common.Address `json:"feeRecipient"`
|
||||||
BaseFee *hexutil.Big `json:"baseFeePerGas"`
|
BaseFee *hexutil.Big `json:"baseFeePerGas"`
|
||||||
PrevRandao common.Hash `json:"prevRandao"`
|
PrevRandao common.Hash `json:"prevRandao"`
|
||||||
Calls []simCallResult `json:"calls"`
|
Withdrawals types.Withdrawals `json:"withdrawals"`
|
||||||
|
Calls []simCallResult `json:"calls"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func simBlockResultFromHeader(header *types.Header, callResults []simCallResult) simBlockResult {
|
func simBlockResultFromHeader(header *types.Header, callResults []simCallResult) simBlockResult {
|
||||||
|
|
@ -74,7 +75,9 @@ func simBlockResultFromHeader(header *types.Header, callResults []simCallResult)
|
||||||
FeeRecipient: header.Coinbase,
|
FeeRecipient: header.Coinbase,
|
||||||
BaseFee: (*hexutil.Big)(header.BaseFee),
|
BaseFee: (*hexutil.Big)(header.BaseFee),
|
||||||
PrevRandao: header.MixDigest,
|
PrevRandao: header.MixDigest,
|
||||||
Calls: callResults,
|
// Withdrawals will be always empty in the context of a simulated block.
|
||||||
|
Withdrawals: make(types.Withdrawals, 0),
|
||||||
|
Calls: callResults,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue