You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For coins to be selected via a database query as to not load all coins into memory.
Actual
Coins are selected by loading all coins for an account and sorted random, age or by value. For an account or wallet with many coins (exact amount depending on available memory), will exhaust the available memory usage. There are also likely performance impact that could be improved.
Solutions
Index coins by age and value for the walletdb, and load only the necessary coins into memory. Random selection can be done by choosing random min value with a range query, and limit of 1.
The text was updated successfully, but these errors were encountered:
With this issue solved, it could be worthwhile to only mark a coin/credit as spent (and not delete) when a block is confirmed, as is currently the case for unconfirmed transactions for a wallet.
Versions
bcoin 0551096 (May 31st, 2019)
Expected
For coins to be selected via a database query as to not load all coins into memory.
Actual
Coins are selected by loading all coins for an account and sorted
random
,age
or byvalue
. For an account or wallet with many coins (exact amount depending on available memory), will exhaust the available memory usage. There are also likely performance impact that could be improved.Solutions
Index coins by age and value for the walletdb, and load only the necessary coins into memory. Random selection can be done by choosing random
min
value with a range query, and limit of 1.The text was updated successfully, but these errors were encountered: