diff options
| author | Pieter Wuille <[email protected]> | 2016-06-07 13:44:56 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-07 13:44:56 +0200 |
| commit | 288d85ddf2e0a0c9d25a23db56052883170466d0 (patch) | |
| tree | 79da8673928fa0254b103a983b137136ea8de40c /src/main.cpp | |
| parent | Optimization: use usec in expiration and reuse nNow (diff) | |
| download | discoin-288d85ddf2e0a0c9d25a23db56052883170466d0.tar.xz discoin-288d85ddf2e0a0c9d25a23db56052883170466d0.zip | |
Get rid of CTxMempool::lookup() entirely
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index db0580bda..b581ece09 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1445,8 +1445,10 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::P LOCK(cs_main); - if (mempool.lookup(hash, txOut)) + std::shared_ptr<const CTransaction> ptx = mempool.get(hash); + if (ptx) { + txOut = *ptx; return true; } |