aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-05-31 15:47:15 +0200
committerWladimir J. van der Laan <[email protected]>2016-05-31 15:47:32 +0200
commit862fd24b40b478f815dcb5df4f705cae2c0a1cf9 (patch)
treee76f4407498a0df5a8b017b9a3102f92de074c0a /src/txmempool.cpp
parentMerge #8090: Adding P2SH(p2pkh) script test case (diff)
parentDo not use mempool for GETDATA for tx accepted after the last mempool req. (diff)
downloaddiscoin-862fd24b40b478f815dcb5df4f705cae2c0a1cf9.tar.xz
discoin-862fd24b40b478f815dcb5df4f705cae2c0a1cf9.zip
Merge #8080: Do not use mempool for GETDATA for tx accepted after the last mempool req.
7e908c7 Do not use mempool for GETDATA for tx accepted after the last mempool req. (Gregory Maxwell)
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index aa5df6ca4..4f17e7f8c 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -789,15 +789,23 @@ void CTxMemPool::queryHashes(vector<uint256>& vtxid)
std::sort(vtxid.begin(), vtxid.end(), DepthAndScoreComparator(this));
}
-bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
+
+bool CTxMemPool::lookup(uint256 hash, CTransaction& result, int64_t& time) const
{
LOCK(cs);
indexed_transaction_set::const_iterator i = mapTx.find(hash);
if (i == mapTx.end()) return false;
result = i->GetTx();
+ time = i->GetTime();
return true;
}
+bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
+{
+ int64_t time;
+ return CTxMemPool::lookup(hash, result, time);
+}
+
bool CTxMemPool::lookupFeeRate(const uint256& hash, CFeeRate& feeRate) const
{
LOCK(cs);