aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
AgeCommit message (Collapse)Author
2017-03-18Rename first iterator to prevent shadowing.Pavel Janík
2017-03-17Merge #9818: Save watch only key timestamps when reimporting keysWladimir J. van der Laan
7759aa2 Save watch only key timestamps when reimporting keys (Russell Yanofsky) Tree-SHA512: 433b5a78e5626fb2f3166e6c84c22eabd5239d451dc82694da95af237e034612a24f1a8bc959b7d2f2e576ce0b679be1fa4af929ebfae758c7e832056ab67061
2017-03-17Merge #9592: [Qt] Add checkbox in the GUI to opt-in to RBF when creating a ↵Jonas Schnelli
transaction c4e4792 [Qt] Change RBF checkbox to reflect -walletrbf setting (Russell Yanofsky) 838a58e [Qt] Add simple optin-RBF checkbox and confirmation info (Jonas Schnelli) 568c05a Allow to opt-into RBF when creating a transaction (Jonas Schnelli) Tree-SHA512: 3d52dcd4e44da8aed4d631748074afef78d38c860f2a8b95323f4801a989d6599a3498a753fc10daba4098c527ef5a0eb942e5b3f1bfd656e1a6bd272b8e6c57
2017-03-14Initialize nRelockTimePatrick Strateman
2017-03-10Add safe flag to listunspent resultNicolasDorier
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-09Merge #9960: Trivial: Add const modifier to GetHDChain and IsHDEnabledWladimir J. van der Laan
3cef950 Trivial: Add const modifier to GetHDChain and IsHDEnabled (NicolasDorier) Tree-SHA512: 73126689e179d70e6823950b51aae4da0a1e348436bc72338814f3afeec27868bb479d9e8261f86e4fe851e84492778a30c5f1fe76c9d7dd91796d0e38baeaf0
2017-03-09Merge #9853: Fix error codes from various RPCsWladimir J. van der Laan
adaa281 Update release notes to include RPC error code changes. (John Newbery) 338bf06 Add commenting around JSON error codes (John Newbery) dab804c Return correct error codes in fundrawtransaction(). (John Newbery) a012087 Return correct error codes in setban(). (John Newbery) 960bc7f Return correct error codes in removeprunedfunds(). (John Newbery) c119096 Return correct error codes in blockchain.cpp. (John Newbery) 6d07c62 Return correct error codes in bumpfee(). (John Newbery) Tree-SHA512: 4bb39ad221cd8c83d98ac5d7ad642f3a8c265522720dc86b2eebc70e74439a85b06d6ddcd6a874e879d986511de3ab0878bb7fe58b50cb0546b78913632ea809
2017-03-09Trivial: Add const modifier to GetHDChain and IsHDEnabledNicolasDorier
2017-03-08Refactor: Remove using namespace <xxx> from wallet/Karl-Johan Alm
2017-03-08Merge #9936: [trivial] Fix three typos introduced into walletdb.h in commit ↵MarcoFalke
7184e25 fdab309 [trivial] Fix typos introduced in 7184e25c80aa8b1629a700bb7a7e290ad0bb2792 (practicalswift) Tree-SHA512: 091666f996267fc5d9f911e6ff25051df5c198851a9c2a6cae73692ffacc64f4275932260487aa48a224ca7f80c58f79933065c72d42aeccae540293c67bcee9
2017-03-07Return correct error codes in fundrawtransaction().John Newbery
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.
2017-03-07Return correct error codes in removeprunedfunds().John Newbery
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.
2017-03-07Return correct error codes in bumpfee().John Newbery
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.
2017-03-07Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan
b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
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-07[trivial] Fix typos introduced in 7184e25c80aa8b1629a700bb7a7e290ad0bb2792practicalswift
2017-03-06Rename FlushWalletDB -> CompactWalletDB, add function descriptionMatt Corallo
2017-03-06Use CScheduler for wallet flushing, remove ThreadFlushWalletDBMatt Corallo
2017-03-06Merge #9906: Disallow copy constructor CReserveKeysWladimir J. van der Laan
188f89c Disallow copy of CReserveKeys (Gregory Sanders) Tree-SHA512: e55ce10bf7f2dc91de9797e60ab7767fb51f25255995d62ddf358c52b7aaa23c26fbfb522e1610ff950b86804ddbc38dc0d7708bfab2c4d33ad99a275d8c77db
2017-03-06Disallow copy of CReserveKeysGregory Sanders
2017-03-06[Wallet] refactor CWallet/CWalletDB/CDBJonas Schnelli
Try to hide CDB/bitdb behinde CWalletDB. Prepare for full wallet database abstraction.
2017-03-06Merge #9333: Document CWalletTx::mapValue entries and remove erase of ↵Wladimir J. van der Laan
nonexistent "version" entry. 87ed396 [trivial] Add comment documenting bumpfee mapValues (Russell Yanofsky) a1fe944 Remove reference to nonexistent "version" wallet transaction mapvalue field (Russell Yanofsky) 654e044 [trivial] Add comment documenting CWalletTx::mapValue (Russell Yanofsky) Tree-SHA512: 1fd1860e345c59b13634db2007fff4ba30aaf1f177fdd765f47bf9257fac117cdcd5d491424416da304c08e85effbb27f3424f072f7c9587ef39cb98531b932a
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-06Merge #9576: [wallet] Remove redundant initializationWladimir J. van der Laan
343ba8f [wallet] Remove redundant initialization (practicalswift) Tree-SHA512: 54b94d7703b1735cb1ae0bd7eba61ca9d2f18e20b70e46c94aa3b0653495dce4fdea00cf953ec08215b96b5792eabb8b38c3f9b3cd36e52b82fcb2f1fd8a3540
2017-03-03[cleanup] Remove coin age priority completely.Alex Morcos
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
2017-03-03No longer allow "free" transactionsAlex Morcos
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks) Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
2017-03-03Define 7200 second timestamp window constantRussell Yanofsky
2017-03-03Save watch only key timestamps when reimporting keysRussell Yanofsky
Previously if an existing watch only key was reimported with a new timestamp, the new timestamp would not be saved in the key metadata, and would not be used to update the wallet nTimeFirstKey value (which could cause rescanning to start at the wrong point and miss transactions). Issue was pointed out by Jonas Schnelli <dev@jonasschnelli.ch> in https://github.com/bitcoin/bitcoin/pull/9108#issuecomment-279715550
2017-03-03Clean up braces in CWallet::ComputeTimeSmartRussell Yanofsky
2017-03-03Add documentation describing CWallet::nTimeSmart.Russell Yanofsky
Most of the text comes from the 2012 Luke Dashjr <luke-jr+git@utopios.org> c3f95ef commit message.
2017-03-03Factor out CWallet::nTimeSmart computation into a method.Russell Yanofsky
No change in behavior, this change just pulls some code out of CWallet::AddToWallet that was making it very long into a separate method.
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-03Merge #8808: Do not shadow variables (gcc set)Wladimir J. van der Laan
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík) 9de90bb Do not shadow variables (gcc set) (Pavel Janík) Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
2017-03-03Merge #8775: RPC refactoring: Access wallet using new GetWalletForJSONRPCRequestWladimir J. van der Laan
d678771 Wallet: Sanitise -wallet parameter (Luke Dashjr) 9756be3 Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name (Luke Dashjr) 86be48a More tightly couple EnsureWalletIsAvailable with GetWalletForJSONRPCRequest where appropriate (Luke Dashjr) a435632 Move wallet RPC declarations to rpcwallet.h (Luke Dashjr) ad15734 RPC: Pass on JSONRPCRequest metadata (URI/user/etc) for "help" method (Luke Dashjr) bf8a04a Reformat touched lines with C++11 (Luke Dashjr) 2e518e3 Move nWalletUnlockTime to CWallet::nRelockTime, and name timed task unique per CWallet (Luke Dashjr) d77ad6d RPC: Do all wallet access through new GetWalletForJSONRPCRequest (Luke Dashjr) eca550f RPC/Wallet: Pass CWallet as pointer to helper functions (Luke Dashjr) Tree-SHA512: bfd592da841693390e16f83b451503eb5cedb71208089aa32b3fc45e973555584a3ed7696dd239f6409324464d565dacf0f3d0e36e8e13ae6a7843848465f960
2017-03-02Merge #9359: Add test for CWalletTx::GetImmatureCredit() returning stale values.MarcoFalke
7ed143c Add test for CWalletTx::GetImmatureCredit() returning stale values. (Russell Yanofsky) Tree-SHA512: c95088ed6dfc5a0774ddaa2fe14ac0a9ebd830922a4d77100ec3d51fdeb6df40ad97de4f2ea970ed0f4122dcc0022ee1d43ab3c7188becd7f90c1c6af0ed39b7
2017-03-02Merge #9143: Refactor ZapWalletTxes to avoid layer violationsWladimir J. van der Laan
0165a56 Refactor ZapWalletTxes to avoid layer vialotions (Jonas Schnelli) Tree-SHA512: 51e3abbb866185817d14d685a65cb1070a7a60aa3db692670f3a5fdd328aad59afa765c5a6b13d9e8f6d219e735487f8c87998f2fb38fdd911c1fe19bea373b9
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-28[wallet] Remove redundant initializationpracticalswift
Prior to this commit pindexRescan was initialized to a chainActive.Tip(). However, the value of pindexRescan set at time of initialization was never read before pindexRescan was being set to either chainActive.Genesis() (case 1), FindForkInGlobalIndex(chainActive, locator) (case 2) or chainActive.Genesis() (case 3). Thus, the initialization was redundant. This commit a.) removes the redundant initialization and b.) simplifies this logic so that pindexRescan is initialized to chainActive.Genesis() (case 1 and 3), and set to FindForkInGlobalIndex(chainActive, locator) (case 2) as needed.
2017-02-28Merge #9829: Fix importmulti returning rescan errors for wrong keysWladimir J. van der Laan
306bd72 Fix importmulti returning rescan errors for wrong keys (Russell Yanofsky) Tree-SHA512: ae9998236cbd3ff749d6b5c716bd76c9cec386b0708583e4912e4e05bf4584545258e1d0543aa5445024d2b5decf859a64f40c6503029773366a0f9a9ddf9b88
2017-02-28Merge #9865: Change bitcoin address in RPC help messageWladimir J. van der Laan
83ac719 Change bitcoin address in RPC helpaddress to an invalid address, so people don't accidentally send coins there (like I did). (Marijn Stollenga) Tree-SHA512: ca1163466a149d567b97efbfcfa8fdfe2d474245b4dd5a1a92555b4e87f8e99df5fee4cd79ef1ce6a98db2337846af78f37c2e6b31d02008b11fa0e151ce6590
2017-02-27Wallet: Sanitise -wallet parameterLuke Dashjr
2017-02-27Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet ↵Luke Dashjr
RPCRunLater job name The job name is logged, and could pose as an information leak to someone attacking the process, helping them counteract ASLR protections
2017-02-27More tightly couple EnsureWalletIsAvailable with GetWalletForJSONRPCRequest ↵Luke Dashjr
where appropriate
2017-02-27Move wallet RPC declarations to rpcwallet.hLuke Dashjr
2017-02-27Reformat touched lines with C++11Luke Dashjr
2017-02-27Move nWalletUnlockTime to CWallet::nRelockTime, and name timed task unique ↵Luke Dashjr
per CWallet
2017-02-27RPC: Do all wallet access through new GetWalletForJSONRPCRequestLuke Dashjr
2017-02-27RPC/Wallet: Pass CWallet as pointer to helper functionsLuke Dashjr