all: refactor txpool into it's own package in prep for 4844

This commit is contained in:
Péter Szilágyi
2022-10-24 16:35:53 +03:00
parent 5f70f9fd37
commit a6dda03644
35 changed files with 408 additions and 385 deletions
+4 -3
View File
@@ -26,6 +26,7 @@ import (
"github.com/ethereum/go-ethereum/consensus/ethash"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/txpool"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
@@ -111,7 +112,7 @@ func init() {
type fuzzer struct {
chain *core.BlockChain
pool *core.TxPool
pool *txpool.TxPool
chainLen int
addr, txs []common.Hash
@@ -137,7 +138,7 @@ func newFuzzer(input []byte) *fuzzer {
chtKeys: chtKeys,
bloomKeys: bloomKeys,
nonce: uint64(len(txHashes)),
pool: core.NewTxPool(core.DefaultTxPoolConfig, params.TestChainConfig, chain),
pool: txpool.NewTxPool(txpool.DefaultConfig, params.TestChainConfig, chain),
input: bytes.NewReader(input),
}
}
@@ -229,7 +230,7 @@ func (f *fuzzer) BlockChain() *core.BlockChain {
return f.chain
}
func (f *fuzzer) TxPool() *core.TxPool {
func (f *fuzzer) TxPool() *txpool.TxPool {
return f.pool
}