From 3c776c71994d7efde8793172cc8c09573a006dcc Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 31 Jan 2020 12:00:37 +0100 Subject: [PATCH] retesteth: clean txpool on rewind, default dao support (#20596) --- cmd/geth/retesteth.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/geth/retesteth.go b/cmd/geth/retesteth.go index f4f7bda00..28e792bd7 100644 --- a/cmd/geth/retesteth.go +++ b/cmd/geth/retesteth.go @@ -355,7 +355,7 @@ func (api *RetestethAPI) SetChainParams(ctx context.Context, chainParams ChainPa ChainID: chainId, HomesteadBlock: homesteadBlock, DAOForkBlock: daoForkBlock, - DAOForkSupport: false, + DAOForkSupport: true, EIP150Block: eip150Block, EIP155Block: eip155Block, EIP158Block: eip158Block, @@ -579,6 +579,9 @@ func (api *RetestethAPI) RewindToBlock(ctx context.Context, newHead uint64) (boo if err := api.blockchain.SetHead(newHead); err != nil { return false, err } + // When we rewind, the transaction pool should be cleaned out. + api.txMap = make(map[common.Address]map[uint64]*types.Transaction) + api.txSenders = make(map[common.Address]struct{}) return true, nil }