aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
Commit message (Collapse)AuthorAgeFilesLines
* s/DOGE/DIS/gTomo Ueda2021-09-021-1/+1
|
* Use CAmount for amountsRoss Nicoll2021-08-081-1/+1
| | | | | | | | | | Use CAmount rather than unsigned int for amounts for consistency with other fee rate amounts. This does change the type from unsigned int to unsigned int64, and while it is unlikely anyone would need a dust limit higher than unsigned int, again this ensures the theoretical maximum is in line with other rates.
* [fees] introduce configurable hard dust limitPatrick Lodder2021-08-051-0/+14
| | | | Co-authored-by: Ross Nicoll <[email protected]>
* fix cents->coins in comment in wallet_tests.cppPatrick Lodder2020-07-221-1/+1
|
* tests: fix non-qt tests that spend dustPatrick Lodder2020-07-221-98/+98
| | | | | | | | - transaction_tests/IsStandard was spending 0.9 DOGE - tx_validationcache_tests/mempool_dblspend was spending 0.11 DOGE - wallet_tests/coin_selection was completely built around spending cents. This test has been completely reworked and redocumented to make sense for Dogecoin
* Update test cases at 1000-byte boundaries (#1439)Ross Nicoll2018-09-191-4/+4
| | | | Update test cases for 1,000 byte TX boundaries; in 1.10 and before the fees for these were rolled up to the next DOGE, however that results in incorrect fees because the UI currently uses 1,000 bytes as a predicted size. This updates the tests to match new behaviour in 1.14.
* Add Dogecoin current fee calculation logic (#1413)Ross Nicoll2018-09-191-1/+37
| | | Introduces 1 COIN/kb fees, rounded up to the next 1 COIN.
* Replace test data with Dogecoin valuesRoss Nicoll2018-09-191-3/+3
| | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow Replace RPC and deterministic signatures in unit tests with Dogecoin values. While conventionally I'd use an alternative implementation for these, as RFC 6979 compliant signature generation isn't terribly common, and there's no reason to suspect we've modified this code, I'm going to assert that it's good enough to test that the code doesn't provide different values. Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are replaced by the Dogecoin PoW tests.
* Fix importwallet edge case rescan bugRussell Yanofsky2017-05-231-0/+62
| | | | | | | | | | | Start importwallet rescans at the first block with timestamp greater or equal to the wallet birthday instead of the last block with timestamp less or equal. This fixes an edge case bug where importwallet could fail to start the rescan early enough if there are blocks with decreasing timestamps or multiple blocks with the same timestamp. Github-Pull: #10410 Rebased-From: 2a8e35a11d4bd4828631654fc7b8b8fe8f0a2460
* Fix importmulti returning rescan errors for wrong keysRussell Yanofsky2017-02-281-3/+14
| | | | | | | | 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" Github-Pull: #9829 Rebased-From: 306bd72157f089b962b9c537bbacf710a4158647
* tests: Fix dangling pwalletMain pointer in wallet testsWladimir J. van der Laan2017-02-281-0/+2
| | | | | Github-Pull: #9875 Rebased-From: 75a109338fbbe9a30c54d76010b538c8ac1080ac
* Return errors from importmulti if complete rescans are not successfulRussell Yanofsky2017-02-221-0/+60
| | | | | Github-Pull: #9773 Rebased-From: e2e2f4c856363bbb0e3b5ba4df225f3754c3db39
* Fix memory leak in wallet testsPieter Wuille2017-01-121-4/+8
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-313-3/+3
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ↵Wladimir J. van der Laan2016-12-201-37/+37
|\ | | | | | | | | | | | | | | | | 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)
| * SelectCoinsMinConf: Prefer coins with fewer ancestorsGregory Sanders2016-12-131-37/+37
| |
* | Fix wallet/test/crypto_tests.cpp for OpenSSL 1.1 API.Gregory Maxwell2016-12-121-12/+20
| | | | | | | | This avoids a compile failure on newly installed debian stretch systems.
* | Make CWalletTx store a CTransactionRef instead of inheritingPieter Wuille2016-12-022-3/+3
|/
* update comments for tx weightBrian Deery2016-11-141-1/+1
|
* wallet: Change CCrypter to use vectors with secure allocatorWladimir J. van der Laan2016-10-191-6/+6
| | | | | | | 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.
* Kill insecure_random and associated global stateWladimir J. van der Laan2016-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Remove last reference to CWalletDB from accounting_tests.cppPatrick Strateman2016-09-151-7/+5
|
* Remove pwalletdb parameter from CWallet::AddAccountingEntryPatrick Strateman2016-09-151-4/+4
|
* Add CWallet::ReorderTransactions and use in accounting_tests.cppPatrick Strateman2016-09-151-1/+1
|
* Add CWallet::ListAccountCreditDebitPatrick Strateman2016-09-151-1/+1
| | | | Simple pass through for CWalletDB::ListAccountCreditDebit
* Do not shadow variables.Pavel Janík2016-08-311-3/+3
|
* Merge #8450: [Test] Replace rpc_wallet_tests.cpp with python RPC unit testsWladimir J. van der Laan2016-08-241-229/+0
|\ | | | | | | | | 9578333 Remove rpc_wallet_tests.cpp (Patrick Strateman) 25400c4 Account wallet feature RPC tests. (Patrick Strateman)
| * Remove rpc_wallet_tests.cppPatrick Strateman2016-08-071-229/+0
| |
* | Add copyright header to wallet_text_fixture.cppWladimir J. van der Laan2016-08-221-0/+4
|/ | | | I created the file but forgot to add this header.
* Remove CWalletDB* parameter from CWallet::AddToWalletPatrick Strateman2016-07-291-3/+3
|
* Split CWallet::AddToWallet into AddToWallet and LoadToWallet.Patrick Strateman2016-07-291-3/+3
| | | | | This removes the fFromLoadWallet flag in AddToWallet. These were already effectively two methods.
* wallet: Revert input selection post-pruningWladimir J. van der Laan2016-07-011-14/+0
| | | | | | | | | | 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.
* [wallet] tests: Don't use floating pointMarcoFalke2016-06-171-21/+25
|
* crypter: add tests for crypterCory Fields2016-05-131-0/+230
| | | | | | | 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.
* Merge #7688: List solvability in listunspent output and improve helpWladimir J. van der Laan2016-04-251-1/+1
|\ | | | | | | c3932b3 List solvability in listunspent output and improve help (Pieter Wuille)
| * List solvability in listunspent output and improve helpPieter Wuille2016-03-141-1/+1
| |
* | test: Rename wallet.dat to wallet_test.datWladimir J. van der Laan2016-04-181-1/+1
| | | | | | | | | | | | | | 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.
* | test: Create test fixture for walletWladimir J. van der Laan2016-04-185-6/+52
| | | | | | | | | | Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by making the wallet tests use their own fixture.
* | test: move accounting_tests and rpc_wallet_tests to wallet/testWladimir J. van der Laan2016-04-182-0/+370
|/ | | | Move the two other wallet tests to where they belong.
* Merge pull request #7293Wladimir J. van der Laan2016-01-071-6/+19
|\ | | | | | | | | faf538b [trivial] Merge test cases and replace CENT with COIN (MarcoFalke) fa3c7e6 [wallet] Add regression test for vValue sort order (MarcoFalke)
| * [trivial] Merge test cases and replace CENT with COINMarcoFalke2016-01-051-15/+10
| |
| * [wallet] Add regression test for vValue sort orderMarcoFalke2016-01-051-0/+18
| |
* | Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ \ | |/ |/| | | | | | | 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)
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
* | [wallet] Adjust pruning testMarcoFalke2015-12-091-8/+10
| |
* | Added a test for the pruning of extraneous inputs after ApproximateBestSetMurch2015-12-071-0/+18
|/
* [wallet] Refactor to use new MIN_CHANGEMarcoFalke2015-10-281-46/+67
| | | | | | | | * 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
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-0/+310
could once be renamed from /src/wallet to /src/legacywallet.