diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-10-27 10:38:40 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-10-27 10:39:44 -0400 |
commit | efaf2d85e3a20ed381ae5156707c970ee0c4fa65 (patch) | |
tree | c3979e73bffcacbd7cfc24a3502a908e2e8dd8f4 /src/test | |
parent | c70f9c0cfc9c4a5559d3f91f29b9541f7f737753 (diff) | |
parent | fa511e8dad87ddee7bf03b82f2ed69e546021004 (diff) |
Merge #13783: validation: Pass tx pool reference into CheckSequenceLocks
fa511e8dad Pass tx pool reference into CheckSequenceLocks (MarcoFalke)
Pull request description:
`CheckSequenceLocks` is called from ATMP and the member function `CTxMemPool::removeForReorg` without passing in the tx pool object that is used in those function's scope and instead using the global `::mempool` instance.
This fix should be refactoring only, since currently there is only one (global) tx pool in normal operation. Though, it fixes hard to track down issues in future settings where more than one mempool exists at a time. (E.g. for tests, rpc or p2p tx relay purposes)
Tree-SHA512: f0804588c7d29bb6ff05ec14f22a16422b89ab31ae714f38cd07f811d7dc7907bfd14e799c4c1c3121144ff22711019bbe9212b39e2fd4531936a4119950fa49
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/miner_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 3eb8aa14fd..354ca7507e 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -92,8 +92,8 @@ static CBlockIndex CreateBlockIndex(int nHeight) static bool TestSequenceLocks(const CTransaction &tx, int flags) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { - LOCK(mempool.cs); - return CheckSequenceLocks(tx, flags); + LOCK(::mempool.cs); + return CheckSequenceLocks(::mempool, tx, flags); } // Test suite for ancestor feerate transaction selection. |