Skip to content

Conversation

@charlesrocket
Copy link
Contributor

codablock and others added 4 commits December 23, 2019 16:32
This avoids sorting before looping through it to figure out what to
request. The assumption that sorting would be cheap when vecAskFor is
already mostly sorted (only unsorted at the end) turned out to be false.
In reality, ~50% of CPU time was consumed by the sort when a lot of traffic
(thousands of TXs) happen.
* Fix cache usage in SelectCoinsGroupedByAddresses

* Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected

* MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
Turned out that this causes SelectCoinsMinConf to (unnecessary) lean towards selecting mempool txes which can cause "too long mempool chain" error even when there are more funds to spend.
@charlesrocket charlesrocket merged commit 138b510 into development Dec 24, 2019
@charlesrocket charlesrocket deleted the dash-bp-371921519 branch December 24, 2019 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants