mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
state override no pointer
This commit is contained in:
parent
bbdbcd84ce
commit
baa9835ee8
2 changed files with 7 additions and 7 deletions
|
|
@ -830,17 +830,17 @@ type SimulateOptions struct {
|
|||
|
||||
// SimulateBlock represents a batch of calls to be simulated.
|
||||
type SimulateBlock struct {
|
||||
BlockOverrides *ethereum.BlockOverrides `json:"blockOverrides,omitempty"`
|
||||
StateOverrides *map[common.Address]ethereum.OverrideAccount `json:"stateOverrides,omitempty"`
|
||||
Calls []ethereum.CallMsg `json:"calls"`
|
||||
BlockOverrides *ethereum.BlockOverrides `json:"blockOverrides,omitempty"`
|
||||
StateOverrides map[common.Address]ethereum.OverrideAccount `json:"stateOverrides,omitempty"`
|
||||
Calls []ethereum.CallMsg `json:"calls"`
|
||||
}
|
||||
|
||||
// MarshalJSON implements json.Marshaler for SimulateBlock.
|
||||
func (s SimulateBlock) MarshalJSON() ([]byte, error) {
|
||||
type Alias struct {
|
||||
BlockOverrides *ethereum.BlockOverrides `json:"blockOverrides,omitempty"`
|
||||
StateOverrides *map[common.Address]ethereum.OverrideAccount `json:"stateOverrides,omitempty"`
|
||||
Calls []interface{} `json:"calls"`
|
||||
BlockOverrides *ethereum.BlockOverrides `json:"blockOverrides,omitempty"`
|
||||
StateOverrides map[common.Address]ethereum.OverrideAccount `json:"stateOverrides,omitempty"`
|
||||
Calls []interface{} `json:"calls"`
|
||||
}
|
||||
calls := make([]interface{}, len(s.Calls))
|
||||
for i, call := range s.Calls {
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ func TestSimulateV1WithStateOverrides(t *testing.T) {
|
|||
opts := ethclient.SimulateOptions{
|
||||
BlockStateCalls: []ethclient.SimulateBlock{
|
||||
{
|
||||
StateOverrides: &stateOverrides,
|
||||
StateOverrides: stateOverrides,
|
||||
Calls: []ethereum.CallMsg{
|
||||
{
|
||||
From: from,
|
||||
|
|
|
|||
Loading…
Reference in a new issue