mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-29 20:47:31 -03:00
6fbb0edac2
Previously in COutput, effective_value was initialized as the absolute value of the txout, and fee as 0. effective_value along with fee were calculated outside of the COutput constructor and set after the object had been initialized. These changes will allow either the fee or the feerate to be passed in a COutput constructor. If either are provided, fee and effective_value are calculated and set in the constructor. As a result, AvailableCoins also needs to be passed the feerate when utxos are being spent. When balance is calculated or the coins are being listed and feerate is neither available nor required, AvailableCoinsListUnspent is used instead, which runs AvailableCoins while providing the default value for feerate. Unit tests for the calculation of effective value have also been added. |
||
---|---|---|
.. | ||
fuzz | ||
coinselector_tests.cpp | ||
db_tests.cpp | ||
init_test_fixture.cpp | ||
init_test_fixture.h | ||
init_tests.cpp | ||
ismine_tests.cpp | ||
psbt_wallet_tests.cpp | ||
scriptpubkeyman_tests.cpp | ||
spend_tests.cpp | ||
util.cpp | ||
util.h | ||
wallet_crypto_tests.cpp | ||
wallet_test_fixture.cpp | ||
wallet_test_fixture.h | ||
wallet_tests.cpp | ||
wallet_transaction_tests.cpp | ||
walletdb_tests.cpp |