aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
AgeCommit message (Collapse)Author
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-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-12Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API.Gregory Maxwell
This avoids a compile failure on newly installed debian stretch systems.
2016-12-02Make CWalletTx store a CTransactionRef instead of inheritingPieter Wuille
2016-11-14update comments for tx weightBrian Deery
2016-10-19wallet: Change CCrypter to use vectors with secure allocatorWladimir J. van der Laan
Change CCrypter to use vectors with secure allocator instead of buffers on in the object itself which will end up on the stack. This avoids having to call LockedPageManager to lock stack memory pages to prevent the memory from being swapped to disk. This is wasteful.
2016-10-17Kill insecure_random and associated global stateWladimir J. van der Laan
There are only a few uses of `insecure_random` outside the tests. This PR replaces uses of insecure_random (and its accompanying global state) in the core code with an FastRandomContext that is automatically seeded on creation. This is meant to be used for inner loops. The FastRandomContext can be in the outer scope, or the class itself, then rand32() is used inside the loop. Useful e.g. for pushing addresses in CNode or the fee rounding, or randomization for coin selection. As a context is created per purpose, thus it gets rid of cross-thread unprotected shared usage of a single set of globals, this should also get rid of the potential race conditions. - I'd say TxMempool::check is not called enough to warrant using a special fast random context, this is switched to GetRand() (open for discussion...) - The use of `insecure_rand` in ConnectThroughProxy has been replaced by an atomic integer counter. The only goal here is to have a different credentials pair for each connection to go on a different Tor circuit, it does not need to be random nor unpredictable. - To avoid having a FastRandomContext on every CNode, the context is passed into PushAddress as appropriate. There remains an insecure_random for test usage in `test_random.h`.
2016-09-15Remove last reference to CWalletDB from accounting_tests.cppPatrick Strateman
2016-09-15Remove pwalletdb parameter from CWallet::AddAccountingEntryPatrick Strateman
2016-09-15Add CWallet::ReorderTransactions and use in accounting_tests.cppPatrick Strateman
2016-09-15Add CWallet::ListAccountCreditDebitPatrick Strateman
Simple pass through for CWalletDB::ListAccountCreditDebit
2016-08-31Do not shadow variables.Pavel Janík
2016-08-24Merge #8450: [Test] Replace rpc_wallet_tests.cpp with python RPC unit testsWladimir J. van der Laan
9578333 Remove rpc_wallet_tests.cpp (Patrick Strateman) 25400c4 Account wallet feature RPC tests. (Patrick Strateman)
2016-08-22Add copyright header to wallet_text_fixture.cppWladimir J. van der Laan
I created the file but forgot to add this header.
2016-08-07Remove rpc_wallet_tests.cppPatrick Strateman
2016-07-29Remove CWalletDB* parameter from CWallet::AddToWalletPatrick Strateman
2016-07-29Split CWallet::AddToWallet into AddToWallet and LoadToWallet.Patrick Strateman
This removes the fFromLoadWallet flag in AddToWallet. These were already effectively two methods.
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-05-13crypter: add tests for crypterCory Fields
Verify that results correct (match known values), consistent (encrypt->decrypt matches the original), and compatible with the previous openssl implementation. Also check that failed encrypts/decrypts fail the exact same way as openssl.
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: Rename wallet.dat to wallet_test.datWladimir J. van der Laan
Indicate that the file name is not hardcoded, and a little bit of safety so that it never nukes the main wallet. Suggestion by Marco Falke.
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-04-18test: move accounting_tests and rpc_wallet_tests to wallet/testWladimir J. van der Laan
Move the two other wallet tests to where they belong.
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.