diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -388,6 +388,8 @@ } }; +typedef std::pair TXModifier; + /** * CTxMemPool stores valid-according-to-the-current-best-chain transactions that * may be included in the next block. @@ -555,7 +557,7 @@ public: indirectmap mapNextTx; - std::map> mapDeltas; + std::map mapDeltas; /** Create a new CTxMemPool. */ diff --git a/src/txmempool.cpp b/src/txmempool.cpp --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -423,10 +423,9 @@ // Update transaction for any feeDelta created by PrioritiseTransaction // TODO: refactor so that the fee delta is calculated before inserting into // mapTx. - std::map>::const_iterator pos = - mapDeltas.find(hash); + std::map::const_iterator pos = mapDeltas.find(hash); if (pos != mapDeltas.end()) { - const std::pair &deltas = pos->second; + const TXModifier &deltas = pos->second; if (deltas.second != Amount(0)) { mapTx.modify(newit, update_fee_delta(deltas.second)); } @@ -984,7 +983,7 @@ const Amount nFeeDelta) { { LOCK(cs); - std::pair &deltas = mapDeltas[hash]; + TXModifier &deltas = mapDeltas[hash]; deltas.first += dPriorityDelta; deltas.second += nFeeDelta; txiter it = mapTx.find(hash); @@ -1018,13 +1017,12 @@ void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, Amount &nFeeDelta) const { LOCK(cs); - std::map>::const_iterator pos = - mapDeltas.find(hash); + std::map::const_iterator pos = mapDeltas.find(hash); if (pos == mapDeltas.end()) { return; } - const std::pair &deltas = pos->second; + const TXModifier &deltas = pos->second; dPriorityDelta += deltas.first; nFeeDelta += deltas.second; }