core/txpool/legacypool: add setCodeTx reorg test
This commit is contained in:
parent
a79f91f554
commit
04a1d11b38
|
@ -2427,7 +2427,7 @@ func TestSetCodeTransactionsReorg(t *testing.T) {
|
|||
}
|
||||
// Simulate the chain moving
|
||||
blockchain.statedb.SetNonce(addrA, 1, tracing.NonceChangeAuthorization)
|
||||
blockchain.statedb.SetState(addrA, common.Hash{}, common.Hash{0x42})
|
||||
blockchain.statedb.SetCode(addrA, types.AddressToDelegation(auth.Address))
|
||||
<-pool.requestReset(nil, nil)
|
||||
// Set an authorization for 0x00
|
||||
auth, _ = types.SignSetCode(keyA, types.SetCodeAuthorization{
|
||||
|
@ -2445,7 +2445,7 @@ func TestSetCodeTransactionsReorg(t *testing.T) {
|
|||
}
|
||||
// Simulate the chain moving
|
||||
blockchain.statedb.SetNonce(addrA, 2, tracing.NonceChangeAuthorization)
|
||||
blockchain.statedb.SetState(addrA, common.Hash{}, common.Hash{})
|
||||
blockchain.statedb.SetCode(addrA, nil)
|
||||
<-pool.requestReset(nil, nil)
|
||||
// Now send two transactions from addrA
|
||||
if err := pool.addRemoteSync(pricedTransaction(2, 100000, big.NewInt(1000), keyA)); err != nil {
|
||||
|
|
Loading…
Reference in New Issue