aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-07-31 20:53:17 +0200
committerPieter Wuille <[email protected]>2016-10-30 23:12:09 -0700
commitc3efb586223c0459cdb47913375c2df805be925e (patch)
tree7da677b8eafc769cde40cae86ac71474c82d5adc /src/txmempool.cpp
parentMerge #8989: [Qt] overhaul smart-fee slider, adjust default confirmation target (diff)
downloaddiscoin-c3efb586223c0459cdb47913375c2df805be925e.tar.xz
discoin-c3efb586223c0459cdb47913375c2df805be925e.zip
Add feedelta to TxMempoolInfo
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index e5d28ac2e..313d33507 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -833,6 +833,10 @@ void CTxMemPool::queryHashes(vector<uint256>& vtxid)
}
}
+static TxMempoolInfo GetInfo(CTxMemPool::indexed_transaction_set::const_iterator it) {
+ return TxMempoolInfo{it->GetSharedTx(), it->GetTime(), CFeeRate(it->GetFee(), it->GetTxSize()), it->GetModifiedFee() - it->GetFee()};
+}
+
std::vector<TxMempoolInfo> CTxMemPool::infoAll() const
{
LOCK(cs);
@@ -841,7 +845,7 @@ std::vector<TxMempoolInfo> CTxMemPool::infoAll() const
std::vector<TxMempoolInfo> ret;
ret.reserve(mapTx.size());
for (auto it : iters) {
- ret.push_back(TxMempoolInfo{it->GetSharedTx(), it->GetTime(), CFeeRate(it->GetFee(), it->GetTxSize())});
+ ret.push_back(GetInfo(it));
}
return ret;
@@ -862,7 +866,7 @@ TxMempoolInfo CTxMemPool::info(const uint256& hash) const
indexed_transaction_set::const_iterator i = mapTx.find(hash);
if (i == mapTx.end())
return TxMempoolInfo();
- return TxMempoolInfo{i->GetSharedTx(), i->GetTime(), CFeeRate(i->GetFee(), i->GetTxSize())};
+ return GetInfo(i);
}
CFeeRate CTxMemPool::estimateFee(int nBlocks) const