Skip to content

Commit

Permalink
doc: add documentation for the modified setupTxPool() on tx_pool_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardolyn committed Jan 15, 2021
1 parent c63e3e1 commit 39b4817
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/tx_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,7 @@ func pricedDataTransaction(nonce uint64, gaslimit uint64, gasprice *big.Int, key
return tx
}

func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.TestChainConfig)
}

// Quorum - created setupTxPoolWithConfig(...) from original setupTxPool() to allow passing a ChainConfig as argument
func setupTxPoolWithConfig(config *params.ChainConfig) (*TxPool, *ecdsa.PrivateKey) {
statedb, _ := state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()))
blockchain := &testBlockChain{statedb, statedb, 10000000, new(event.Feed)}
Expand All @@ -101,6 +98,10 @@ func setupTxPoolWithConfig(config *params.ChainConfig) (*TxPool, *ecdsa.PrivateK
return pool, key
}

func setupTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.TestChainConfig)
}

func setupQuorumTxPool() (*TxPool, *ecdsa.PrivateKey) {
return setupTxPoolWithConfig(params.QuorumTestChainConfig)
}
Expand Down

0 comments on commit 39b4817

Please sign in to comment.