diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-05 08:36:34 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-05 08:36:52 +0200 |
commit | f93f9b92969b4a3f77d3f1c2a30ba3bf558e0cac (patch) | |
tree | 4cb48ee34c21a9592fcc1b9c66d1b7953d827423 /src | |
parent | 5fc6a77aa6261b23e94eae4c3a9f56dd62895d87 (diff) | |
parent | 9bef02e36525d0eed4e2e31678b3ff04bbb0b8cb (diff) | |
download | bitcoin-f93f9b92969b4a3f77d3f1c2a30ba3bf558e0cac.tar.xz |
Merge #10144: Prioritisetransaction wasn't always updating ancestor fee
9bef02e Bugfix: ancestor modifed fees were incorrect for descendants (Suhas Daftuar)
ba7dd8b Test prioritisetransaction and ancestor fee state (Suhas Daftuar)
Tree-SHA512: 01977d88e1afb093a003f22a6f29ea60df3d70a179fe7e55910b9c8c340c4af9fb20cdc804c40235b62c43c453f0194eda0d0d4dbd365d2d98347f5dbe5de01c
Diffstat (limited to 'src')
-rw-r--r-- | src/txmempool.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 36a046ed2a..0794a3902f 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -912,6 +912,13 @@ void CTxMemPool::PrioritiseTransaction(const uint256& hash, const CAmount& nFeeD BOOST_FOREACH(txiter ancestorIt, setAncestors) { mapTx.modify(ancestorIt, update_descendant_state(0, nFeeDelta, 0)); } + // Now update all descendants' modified fees with ancestors + setEntries setDescendants; + CalculateDescendants(it, setDescendants); + setDescendants.erase(it); + BOOST_FOREACH(txiter descendantIt, setDescendants) { + mapTx.modify(descendantIt, update_ancestor_state(0, nFeeDelta, 0, 0)); + } } } LogPrintf("PrioritiseTransaction: %s feerate += %s\n", hash.ToString(), FormatMoney(nFeeDelta)); |