mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
internal/ethapi: rm state override and set code in genesis for TestSimulateV1ChainLinkage
This commit is contained in:
parent
db24b2782c
commit
3a01c3a230
1 changed files with 11 additions and 18 deletions
|
|
@ -2314,15 +2314,16 @@ func TestSimulateV1ChainLinkage(t *testing.T) {
|
||||||
var (
|
var (
|
||||||
acc = newTestAccount()
|
acc = newTestAccount()
|
||||||
sender = acc.addr
|
sender = acc.addr
|
||||||
|
contractAddr = common.Address{0xaa, 0xaa}
|
||||||
|
recipient = common.Address{0xbb, 0xbb}
|
||||||
gspec = &core.Genesis{
|
gspec = &core.Genesis{
|
||||||
Config: params.MergedTestChainConfig,
|
Config: params.MergedTestChainConfig,
|
||||||
Alloc: types.GenesisAlloc{
|
Alloc: types.GenesisAlloc{
|
||||||
sender: {Balance: big.NewInt(params.Ether)},
|
sender: {Balance: big.NewInt(params.Ether)},
|
||||||
|
contractAddr: {Code: common.Hex2Bytes("5f35405f8114600f575f5260205ff35b5f80fd")},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
signer = types.LatestSigner(params.MergedTestChainConfig)
|
signer = types.LatestSigner(params.MergedTestChainConfig)
|
||||||
contractAddr = common.Address{0xaa, 0xaa}
|
|
||||||
recipient = common.Address{0xbb, 0xbb}
|
|
||||||
)
|
)
|
||||||
backend := newTestBackend(t, 1, gspec, beacon.New(ethash.NewFaker()), func(i int, b *core.BlockGen) {
|
backend := newTestBackend(t, 1, gspec, beacon.New(ethash.NewFaker()), func(i int, b *core.BlockGen) {
|
||||||
tx := types.MustSignNewTx(acc.key, signer, &types.LegacyTx{
|
tx := types.MustSignNewTx(acc.key, signer, &types.LegacyTx{
|
||||||
|
|
@ -2378,15 +2379,7 @@ func TestSimulateV1ChainLinkage(t *testing.T) {
|
||||||
blocks = []simBlock{
|
blocks = []simBlock{
|
||||||
{Calls: []TransactionArgs{call1}},
|
{Calls: []TransactionArgs{call1}},
|
||||||
{Calls: []TransactionArgs{call2}},
|
{Calls: []TransactionArgs{call2}},
|
||||||
{
|
{Calls: []TransactionArgs{call3a, call3b}},
|
||||||
StateOverrides: &override.StateOverride{
|
|
||||||
contractAddr: override.OverrideAccount{
|
|
||||||
// Takes block number as input and returns the block hash.
|
|
||||||
Code: hex2Bytes("0x5f35405f8114600f575f5260205ff35b5f80fd"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
Calls: []TransactionArgs{call3a, call3b},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue