aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/wallet_tests.cpp
AgeCommit message (Collapse)Author
2017-04-19Merge #9827: Improve ScanForWalletTransactions return valueWladimir J. van der Laan
30abce7 Improve ScanForWalletTransactions return value (Russell Yanofsky) Tree-SHA512: 195028553b103052a842b6a37e67410118a20c32475b80f7fd22d6d8622f92eca1c2d84f291d1092bef2161d3187d91052799b533e1e265b7613d51955490b8d
2017-04-08[Wallet] Rename std::pair<const CWalletTx*, unsigned int> to CInputCoinNicolasDorier
2017-03-10Add COutput::fSafe member for safe handling of unconfirmed outputsRussell Yanofsky
This exposes a value computed in CWallet::AvailableCoins so it can used for other things, like inclusion in listunspent output.
2017-03-08Refactor: Remove using namespace <xxx> from wallet/Karl-Johan Alm
2017-03-07Merge #9369: Factor out CWallet::nTimeSmart computation into a method.Wladimir J. van der Laan
630fc54 Clean up braces in CWallet::ComputeTimeSmart (Russell Yanofsky) 6c996c2 Add documentation describing CWallet::nTimeSmart. (Russell Yanofsky) 1f98abe Factor out CWallet::nTimeSmart computation into a method. (Russell Yanofsky) c6b82d1 Add tests for CWalletTx::nTimeSmart (Russell Yanofsky) Tree-SHA512: 457a30251e572cf20dac0198af1a94128d269b1e0ce6605a213d56fc14d85c84a0a494e3dcbb18c201c4f39e6f7b000bd9cb6f283930d8452e4bb93ba406f8d4
2017-03-06Merge #9908: Define 7200 second timestamp window constantWladimir J. van der Laan
e57a1fd Define 7200 second timestamp window constant (Russell Yanofsky) Tree-SHA512: 449d20e4fd23905cd96be36f717c55a0a2360aba1002aaf55a3699cce4a41f6e94acc2fbe511a93c5cbe8f8e68386995a76cad67620ebb66ba9283e6080ab567
2017-03-03Define 7200 second timestamp window constantRussell Yanofsky
2017-03-03Add tests for CWalletTx::nTimeSmartRussell Yanofsky
2017-03-03Merge #9828: Avoid -Wshadow warnings in wallet_testsWladimir J. van der Laan
09fe346 Avoid -Wshadow warnings in wallet_tests (Russell Yanofsky) Tree-SHA512: 03a026787438efc9eba94299c2dd7de07a71ec7363b058b4f086d5ff0be844660fff2ef4f40e43d91313ea53de25f3de3c677b080b564d37f0693057498d3233
2017-03-01Improve ScanForWalletTransactions return valueRussell Yanofsky
Change ScanForWalletTransactions return value so it is possible to distinguish scans that skip reading every block (due to the nTimeFirstKey optimization) from scans that fail while reading the chainActive.Tip() block. Return value is now non-null in the non-failing case. This change doesn't affect any user-visible behavior, it is only an internal API improvement. The only code currently using the ScanForWalletTransactions return value is in importmulti, and importmulti always calls ScanForWalletTransactions with a pindex pointing to the first block in chainActive whose block time is >= (nLowestTimestamp - 7200), while ScanForWalletTransactions would only return null without reading blocks when pindex and every block after it had a block time < (nTimeFirstKey - 7200). These conditions could never happen at the same time because nTimeFirstKey <= nLowestTimestamp. I'm planning to make a more substantial API improvement in the future (making ScanForWalletTransactions private and exposing a higher level rescan method to RPC code), but Matt Corallo <git@bluematt.me> pointed out this odd behavior introduced by e2e2f4c "Return errors from importmulti if complete rescans are not successful" yesterday, so I'm following up now to get rid of badness introduced by that merge.
2017-03-01Add test for CWalletTx::GetImmatureCredit() returning stale values.Russell Yanofsky
Add test for cached immature credit flag not being cleared in CWalletTx::MarkDirty() bug, which was fixed in https://github.com/bitcoin/bitcoin/pull/8717, commit a560378.
2017-02-27Fix importmulti returning rescan errors for wrong keysRussell Yanofsky
Bug was a missing ++i line in a new range for loop added in commit e2e2f4c "Return errors from importmulti if complete rescans are not successful"
2017-02-27tests: Fix dangling pwalletMain pointer in wallet testsWladimir J. van der Laan
2017-02-22Avoid -Wshadow warnings in wallet_testsRussell Yanofsky
Warnings introduced by commit e2e2f4c "Return errors from importmulti if complete rescans are not successful" and reported by Pavel Janík <Pavel@Janik.cz> in https://github.com/bitcoin/bitcoin/pull/9773 and https://github.com/bitcoin/bitcoin/pull/9827 wallet/test/wallet_tests.cpp: In member function ‘void wallet_tests::rescan::test_method()’: wallet/test/wallet_tests.cpp:377:17: warning: declaration of ‘wallet’ shadows a global declaration [-Wshadow] CWallet wallet;
2017-02-17Return errors from importmulti if complete rescans are not successfulRussell Yanofsky
2017-01-12Fix memory leak in wallet testsPieter Wuille
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-20Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ↵Wladimir J. van der Laan
ATMP cee1612 reduce number of lookups in TransactionWithinChainLimit (Gregory Sanders) af9bedb Test for fix of txn chaining in wallet (Gregory Sanders) 5882c09 CreateTransaction: Don't return success with too-many-ancestor txn (Gregory Sanders) 0b2294a SelectCoinsMinConf: Prefer coins with fewer ancestors (Gregory Sanders)
2016-12-13SelectCoinsMinConf: Prefer coins with fewer ancestorsGregory Sanders
2016-12-02Make CWalletTx store a CTransactionRef instead of inheritingPieter Wuille
2016-11-14update comments for tx weightBrian Deery
2016-08-31Do not shadow variables.Pavel Janík
2016-07-01wallet: Revert input selection post-pruningWladimir J. van der Laan
This reverts PR #4906, "Coinselection prunes extraneous inputs from ApproximateBestSubset". Apparently the previous behavior of slightly over-estimating the set of inputs was useful in cleaning up UTXOs. See also #7664, #7657, as well as 2016-07-01 discussion on #bitcoin-core-dev IRC.
2016-06-17[wallet] tests: Don't use floating pointMarcoFalke
2016-04-25Merge #7688: List solvability in listunspent output and improve helpWladimir J. van der Laan
c3932b3 List solvability in listunspent output and improve help (Pieter Wuille)
2016-04-18test: Create test fixture for walletWladimir J. van der Laan
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by making the wallet tests use their own fixture.
2016-03-14List solvability in listunspent output and improve helpPieter Wuille
2016-01-07Merge pull request #7293Wladimir J. van der Laan
faf538b [trivial] Merge test cases and replace CENT with COIN (MarcoFalke) fa3c7e6 [wallet] Add regression test for vValue sort order (MarcoFalke)
2016-01-05[trivial] Merge test cases and replace CENT with COINMarcoFalke
2016-01-05Merge pull request #7205Wladimir J. van der Laan
fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
2016-01-05[wallet] Add regression test for vValue sort orderMarcoFalke
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-12-09[wallet] Adjust pruning testMarcoFalke
2015-12-07Added a test for the pruning of extraneous inputs after ApproximateBestSetMurch
2015-10-28[wallet] Refactor to use new MIN_CHANGEMarcoFalke
* Introduce new constant MIN_CHANGE and use it instead of the hardcoded "CENT" * Add test case for MIN_CHANGE * Introduce new constant for -mintxfee default: DEFAULT_TRANSACTION_MINFEE = 1000
2015-03-12[Move Only] Move wallet related things to src/wallet/Jonas Schnelli
could once be renamed from /src/wallet to /src/legacywallet.