aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
Commit message (Collapse)AuthorAgeFilesLines
* s/DOGE/DIS/gTomo Ueda2021-09-022-2/+2
|
* really s/Doge/Dis/g this timeTomo Ueda2021-09-024-21/+21
|
* really s/doge/dis/g this timeTomo Ueda2021-09-024-34/+34
|
* fees: remove careless override of -paytxfee in GetMinimumFeePatrick Lodder2021-08-161-8/+13
|
* Adding startup logic where -paytxfee if lower than default, implies ↵michilumin2021-08-111-0/+7
| | | | -mintxfee is also lowered.
* Use CAmount for constant amounts tooRoss Nicoll2021-08-081-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]>
* p2p: Reduce BIP125 replace by fee increment valueMichi Lumin2021-08-042-3/+7
|
* Initial back end framework to separate wallet and relay fees + dust.Michi Lumin2021-07-302-9/+17
|
* Switch `bitcoinprivkey` to `dogecoinprivkey`chromatic2021-04-181-1/+1
|
* Add query options to listunspent rpc callPedro Branco2021-02-223-18/+80
|
* [wallet] fix typo in rpcwallet.cppIkko Ashimine2021-02-061-1/+1
| | | replacable -> replaceable
* 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
* Merge pull request #1615 from rnicoll/1.14/dust-feesMax K2019-11-031-2/+2
|\ | | | | Correct dust and change
| * Correct dust and changeRoss Nicoll2019-11-031-2/+2
| | | | | | | | | | Correct dust threshold, which is never less than 1 DOGE. Correct minimum change, which is 1 DOGE.
* | Introduce basic Dogecoin brandingRoss Nicoll2019-03-253-73/+73
|/
* Drop use of smart feesRoss Nicoll2019-03-171-1/+3
| | | | | Drop use of smart fees when calculating transaction fees. Dogecoin fees are intentionally on a fixed schedule.
* Clean up RPC tests (#1465)Ross Nicoll2018-09-191-2/+0
| | | | | | | | | | * Enable full block tests * Fix invalidblocktest * Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later. * Fix `fundrawtransaction` tests and sanitize fee calculation at the same time * Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions * Set block versions on full block tests so that the generated blocks are AuxPoW compatible
* 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.
* Bring 1.14 fees in line with 1.10 (#1425)Ross Nicoll2018-09-192-8/+4
| | | | | | * Disable free transactions * Updating remaining fee calculation constants * Round up to the nearest 1k, not up 1k so the UI fee estimator is correct
* Add Dogecoin current fee calculation logic (#1413)Ross Nicoll2018-09-194-16/+68
| | | Introduces 1 COIN/kb fees, rounded up to the next 1 COIN.
* Verify when doing 'backupwallet' that destination is not the same path of ↵Lola Dam2018-09-191-5/+10
| | | | the original wallet.dat file. (#1406)
* Modify chain consensus parameters to be height aware (#1396)Ross Nicoll2018-09-192-2/+2
| | | | | | | | | * Modify chain consensus parameters to be height aware * Correct implementation of simplified rewards in parameters * Correct max money * Use base block version in IsSuperMajority() instead of full version * Correct mining of blocks in AuxPoW tests * Add in missing pre-AuxPoW consensus checks
* Merge AuxPoW support from NamecoreRoss Nicoll2018-09-192-121/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes are as below: Wrap CBlockHeader::nVersion into a new class (CBlockVersion). This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID. Update getauxblock.py for new 'generate' RPC call. Add 'auxpow' to block JSON. Accept auxpow as PoW verification. Add unit tests for auxpow verification. Add check for memory-layout of CBlockVersion. Weaken auxpow chain ID checks for the testnet. Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks. Use this to disable the checks on testnet. Introduce CPureBlockHeader. Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two. Differentiate between uint256 and arith_uint256. This change was done upstream, modify the auxpow code. Add missing lock in auxpow_tests. Fix REST header check for auxpow headers. Those can be longer, thus take that into account. Also perform the check actually on an auxpow header. Correctly set the coinbase for getauxblock results. Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be. (BIP30 block height and COINBASE_FLAGS.) Implement getauxblock plus regression test. Turn auxpow test into FIXTURE test. This allows using of the Params() calls. Move CMerkleTx code to auxpow.cpp. Otherwise we get linker errors when building without wallet. Fix rebase with BIP66. Update the code to handle BIP66's nVersion=3. Enforce that auxpow parent blocks have no auxpow block version. This is for compatibility with namecoind. See also https://github.com/namecoin/namecoin/pull/199. Move auxpow-related parameters to Consensus::Params.
* 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.
* [wallet] Securely erase potentially sensitive keys/valuesThomas Snider2017-06-051-21/+22
| | | | | Github-Pull: #10308 Rebased-From: 6c914ac176624468c66febdb1ad0e24ff2118a5f
* [wallet] Make sure pindex is non-null before possibly referencing in ↵Karl-Johan Alm2017-06-051-4/+4
| | | | | | | LogPrintf call. Github-Pull: #10265 Rebased-From: c36ea693ee16611e0337aec682d1ce80b90e1bd3
* Return correct error codes in fundrawtransaction().John Newbery2017-06-051-1/+1
| | | | | | | | | | | | | | | | The fundrawtransaction() RPC was returning misleading or incorrect error codes (for example RPC_INTERNAL_ERROR when funding the transaction failed). This commit fixes those error codes: - RPC_INTERNAL_ERROR should not be returned for application-level errors, only for genuine internal errors such as corrupted data. That error code has been replaced with RPC_WALLET_ERROR. This commit also updates the test cases to explicitly test the error code. Github-Pull: #9853 Rebased-From: dab804c18a427901684ebe936b2069a97e04a268
* Return correct error codes in removeprunedfunds().John Newbery2017-06-051-2/+2
| | | | | | | | | | | | | | | | The removeprunedfunds() RPC was returning misleading or incorrect error codes (for example RPC_INTERNAL_ERROR when the transaction was not found in the wallet). This commit fixes those error codes: - RPC_INTERNAL_ERROR should not be returned for application-level errors, only for genuine internal errors such as corrupted data. This error code has been replaced with RPC_WALLET_ERROR. This commit also updates the test cases to explicitly test the error code. Github-Pull: #9853 Rebased-From: 960bc7f778d8dd618e65f1e37ec734e2d4734051
* Return correct error codes in bumpfee().John Newbery2017-06-051-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bumpfee() RPC was returning misleading or incorrect error codes (for example RPC_INVALID_ADDRESS_OR_KEY when the transaction was not BIP125 replacable). This commit fixes those error codes: - RPC_INVALID_ADDRESS_OR_KEY if an invalid address was provided: - Invalid change address given - RPC_INVALID_PARAMETER if a single (non-address/key) parameter is incorrect - confTarget and totalFee options should not both be set. - Invalid confTarget - Insufficient totalFee (cannot be less than required fee) - RPC_WALLET_ERROR for any other error - Transaction has descendants in the wallet - Transaction has descendants in the mempool - Transaction has been mined, or is conflicted with a mined transaction - Transaction is not BIP 125 replaceable - Transaction has already been bumped - Transaction contains inputs that don't belong to the wallet - Transaction has multiple change outputs - Transaction does not have a change output - Fee is higher than maxTxFee - New fee rate is less than the minimum fee rate - Change output is too small. This commit also updates the test cases to explicitly test the error code. Github-Pull: #9853 Rebased-From: 6d07c62322f60eb2702c6654e994fc353bcfcf8c
* [Wallet] unset change position when there is no change on exact matchGregory Sanders2017-05-311-2/+3
|
* Fix importwallet edge case rescan bugRussell Yanofsky2017-05-232-6/+65
| | | | | | | | | | | 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
* Clarify importprivkey help text with example of blank label without rescanWarren Togami2017-04-201-0/+2
| | | | | | | Occasionally I waste a lot of time not remembering that the second parameter to importprivkey must be blank if you intend to stop rescan with "false" as the third parameter. Github-Pull: #10207 Rebased-From: c9e31c36ffacedb85d4d9ce75a92e011a3e7d4b4
* Fix importmulti returning rescan errors for wrong keysRussell Yanofsky2017-02-282-3/+15
| | | | | | | | 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
* Change bitcoin address in RPC helpaddress to an invalid address, so people ↵Marijn Stollenga2017-02-281-15/+15
| | | | | | | don't accidentally send coins there (like I did). Github-Pull: #9865 Rebased-From: 83ac719d34f98cc1d3efa6ece2b95145bcde8775
* Update sendfrom RPC help to correct coin selection misconceptionRussell Yanofsky2017-02-281-0/+3
| | | | | Github-Pull: #9840 Rebased-From: f81f0d003079b96b8c33d3dfe76f90e50344bcd8
* 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-224-11/+99
| | | | | Github-Pull: #9773 Rebased-From: e2e2f4c856363bbb0e3b5ba4df225f3754c3db39
* [wallet] Remove importmulti always-true checkRussell Yanofsky2017-02-201-1/+1
| | | | | | | | | | Remove "nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()" check from importmulti, which is always true because nLowestTimestamp is set to the minimum of the most recent block time and all the imported key timestamps, which is necessarily lower than the maximum block time. Github-Pull: #9760 Rebased-From: ec1267f13b7d0b9b5058c6821cf8dbf74e02d17c
* Use 2 hour grace period for key timestamps in importmulti rescansRussell Yanofsky2017-02-161-2/+3
| | | | | | | | Gregory Maxwell <[email protected]> pointed out the lack of grace period in https://github.com/bitcoin/bitcoin/pull/9490#issue-199407998. The importwallet RPC which uses key timestamps in a similar way already has a 2 hour grace period.
* Merge #9771: Add missing cs_wallet lock that triggers new lock held assertionWladimir J. van der Laan2017-02-161-1/+1
|\ | | | | | | 07afcd6 Add missing cs_wallet lock that triggers new lock held assertion (Russell Yanofsky)
| * Add missing cs_wallet lock that triggers new lock held assertionRussell Yanofsky2017-02-151-1/+1
| | | | | | | | | | | | | | | | A new AssertLockHeld(cs_wallet) call was added in commit a58370e "Dedup nTimeFirstKey update logic" (part of PR #9108). The lock held assertion will fail when loading prexisting wallets files from before the #9108 merge that have watch-only keys.
* | Merge #9764: wallet: Prevent "overrides a member function but is not marked ↵Wladimir J. van der Laan2017-02-161-11/+11
|\ \ | |/ |/| | | | | | | 'override'" warnings 6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)
| * wallet: Prevent "overrides a member function but is not marked 'override'" ↵Wladimir J. van der Laan2017-02-151-11/+11
| | | | | | | | | | | | | | | | | | warnings Because it is used inconsistently at least version 5.4.0 of g++ to complains about methods that don't use override. There is two ways to go about this: remove override from the methods having it, or add it to the methods missing it. I chose the second.
* | Merge #9756: Return error when importmulti called with invalid address.Wladimir J. van der Laan2017-02-151-0/+3
|\ \ | |/ |/| | | 9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
| * Return error when importmulti called with invalid address.Russell Yanofsky2017-02-131-0/+3
| | | | | | | | Lack of error checking noticed by Alex Morcos <[email protected]>
* | Use importmulti timestamp when importing watch only keysRussell Yanofsky2017-02-105-34/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | When importing a watch-only address over importmulti with a specific timestamp, the wallet's nTimeFirstKey is currently set to 1. After this change, the provided timestamp will be used and stored as metadata associated with watch-only key. This can improve wallet performance because it can avoid the need to scan the entire blockchain for watch only addresses when timestamps are provided. Also adds timestamp to validateaddress return value (needed for tests). Fixes #9034.
* | Dedup nTimeFirstKey update logicRussell Yanofsky2017-02-104-23/+24
| | | | | | | | | | | | | | Also make nTimeFirstKey member variable private. This is just a cleanup change, it doesn't change behavior in any significant way.