aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
AgeCommit message (Collapse)Author
2019-03-18Merge #15491: wallet: Improve log output for errors during loadMeshCollider
faf369880 wallet: Improve log output for errors during load (Glenn Willen) Pull request description: When loading the wallet, display the entire path in error messages, instead of the name (which, for the default wallet, is the empty string.) When an exception occurs during wallet loading, display e.what() if possible, instead of nothing. Tree-SHA512: 435247628db669579bb694ba4b53ba174fe42c0329fc72f09fc274bb28463ee69f53412abb2a3b45bb8f59f7eb928c0167e397b8d0a514135142192a87294614
2019-03-14wallet: Improve log output for errors during loadGlenn Willen
When loading the wallet, display the entire path in error messages, instead of the name (which, for the default wallet, is the empty string.) When an exception occurs during wallet loading, display e.what() if possible, instead of nothing.
2019-03-13wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtreeJoão Barbosa
2019-03-04doc: Move wallet lock annotations to headerMarcoFalke
2019-03-04Merge #15288: Remove wallet -> node global function callsMarcoFalke
f7efd87c8f Change brace formatting (Russell Yanofsky) a1df1b48a8 Remove use of IsInitialBlockDownload in wallet code (Russell Yanofsky) 1106a6fde4 Remove use of uiInterface.LoadWallet in wallet code (Russell Yanofsky) 318f41fb2c circular-dependencies: Avoid treating some .h/.cpp files as a unit (Russell Yanofsky) d02b34c8a8 Remove use of AcceptToMemoryPool in wallet code (Russell Yanofsky) e2c8ba9f6e Remove uses of InitMessage/Warning/Error in wallet code (Russell Yanofsky) c5e59a96a8 Remove uses of GetAdjustedTime in wallet code (Russell Yanofsky) 6d6bcc77c0 Remove use of g_connman / PushInventory in wallet code (Russell Yanofsky) 00dfb2a440 Remove uses of g_connman in wallet code (Russell Yanofsky) cc3836e8f9 Remove uses of fPruneMode in wallet code (Russell Yanofsky) cc02c796d3 Remove uses of fee globals in wallet code (Russell Yanofsky) 1fb0a4a04e Remove use of CalculateMemPoolAncestors in wallet code (Russell Yanofsky) cd32160af0 Remove use of GetTransactionAncestry in wallet code (Russell Yanofsky) 291276f7f4 Remove use of GetCountWithDescendants in wallet code (Russell Yanofsky) bdc6628683 Remove use of IsRBFOptIn in wallet code (Russell Yanofsky) 80f52a2267 Remove uses of CheckFinalTx in wallet code (Russell Yanofsky) Pull request description: This change removes wallet calls to node functions that access global chain and mempool state. This is the next step in the larger #10973 refactoring change, which removes all other accesses to node global variables from wallet code. Doing this is useful to provide a better defined interface between the wallet and node, and necessary to allow wallet and node code to run in separate processes in #10102. Tree-SHA512: 40dbaf1f59fb22b32e70b054b30ba5638d638aa3240fa30e0f721d53c721cd6138a7ab4d423a24d7d2fda0b956e68d44c733abc2c9259c3d6c9fd6d4be89aa23
2019-03-02Merge #15492: [rpc] remove deprecated generate methodMarcoFalke
07cae5287c [wallet] remove unused GetScriptForMining (Sjors Provoost) 8bb3e4c487 [rpc] remove deprecated generate method (Sjors Provoost) Pull request description: As announced in v0.18, the wallet generate rpc method is deprecated and will be fully removed in v0.19. Clients should transition to using the node rpc method `generatetoaddress`. Tree-SHA512: 9e5e913b59f3e18440b2b7b356124c7b87ad19f81a1ab6ada06a6c396b84e734895465f569296f1ba8c12abf74863bab5fd77765c9e806c239713aa83a59485f
2019-03-01[wallet] remove unused GetScriptForMiningSjors Provoost
2019-02-28Use stop/[start,stop] notation in importmulti desc rangePieter Wuille
2019-02-27[rpc] remove deprecated generate methodSjors Provoost
2019-02-23wallet: Use fsbridge::ifstream to fix Windows path issueChun Kuan Lee
2019-02-22Change brace formattingRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/15288#pullrequestreview-197915100
2019-02-22Remove use of IsInitialBlockDownload in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of uiInterface.LoadWallet in wallet codeRussell Yanofsky
This also changes the uiInterface.LoadWallet signal argument type from shared_ptr<CWallet> to unique_ptr<interfaces::Wallet> because CWallet is an internal wallet class that shouldn't be used in non-wallet code (and also can't be passed across process boundaries). This commit does not change behavior.
2019-02-22Remove use of AcceptToMemoryPool in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of InitMessage/Warning/Error in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of GetAdjustedTime in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of g_connman / PushInventory in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of g_connman in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of fPruneMode in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of fee globals in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of CalculateMemPoolAncestors in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of GetTransactionAncestry in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of GetCountWithDescendants in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove use of IsRBFOptIn in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Remove uses of CheckFinalTx in wallet codeRussell Yanofsky
This commit does not change behavior.
2019-02-22Merge #15408: Remove unused TransactionError constantsMarcoFalke
fa9b60c842 Remove unused TransactionError constants (MarcoFalke) Pull request description: Fixup to #14978, which introduced a bunch of unused enum values, such as `UNKNOWN_ERROR`, `ERROR_COUNT` and `TRANSACTION_ERR_LAST`. None of those have a meaning in the context of an `enum class`, where the compiler can infer if all cases have been covered in a switch-case. Also, move the global `::maxTxFee` back to the rpc caller, so it can be set on a per call basis (in the future). Tree-SHA512: 7f1e2d795f1c1278ecd54ddab2b92c2a862f3c637b482d1d008208925befa1c9dd4b3c4bb1bfcbc5ca4b66a41004aaf01ea96ea95236f944250b8a6cf99ff173
2019-02-17Use a single wallet batch for UpgradeKeyMetadataJonas Schnelli
2019-02-17Merge #15425: [Doc] add missing newline to listunspent help for witnessScriptWladimir J. van der Laan
d3661a3fd247e8fb3911e2f7256025de8b163aeb [Doc] add missing newline to witnessScript in listunspent help (David A. Harding) Pull request description: Tree-SHA512: 85bb9c693bac36da0239eb6a1f42c2173d0170d5ff3d4c2fcd8897cfab233ef8c8ebc1eb5591e3dc89d091fde221d77c872f14a1eec201fee4dc83ba788390c3
2019-02-16[Doc] importmulti: add missing description of keypool optionDavid A. Harding
2019-02-16[Doc] add missing newline to witnessScript in listunspent helpDavid A. Harding
2019-02-15Make descriptor checksums mandatory in deriveaddresses and importmultiPieter Wuille
2019-02-14Import public keys in orderAndrew Chow
Do public key imports in the order that they are specified in the import or in the descriptor range.
2019-02-14Add option to importmulti add an imported pubkey to the keypoolAndrew Chow
Adds a new option to importmulti where the pubkeys specified in the import object can be added to the keypool. This only works if the wallet has private keys disabled.
2019-02-14Fetch keys from keypool when private keys are disabledAndrew Chow
When private keys are disabled, still fetch keys from the keypool if the keypool has keys. Those keys come from importing them and adding them to the keypool.
2019-02-14Add a method to add a pubkey to the keypoolAndrew Chow
Introduces AddKeypoolPubkey in order to add a pubkey to the keypool
2019-02-15Merge #14021: Import key origin data through descriptors in importmultiMeshCollider
cb3511b9d Add release notes for importing key origin info change (Andrew Chow) 4c75a69f3 Test importing descriptors with key origin information (Andrew Chow) 02d6586d7 Import KeyOriginData when importing descriptors (Andrew Chow) 3d235dff5 Implement a function to add KeyOriginInfo to a wallet (Andrew Chow) eab63bc26 Store key origin info in key metadata (Andrew Chow) 345bff601 Remove hdmasterkeyid (Andrew Chow) bac8c676a Add a method to CWallet to write just CKeyMetadata (Andrew Chow) e7652d3f6 Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp} (Andrew Chow) c45415f73 Refactor keymetadata writing to a separate method (Andrew Chow) Pull request description: This PR allows for key origin data as defined by the descriptors document to be imported to the wallet when importing a descriptor using `importmulti`. This allows the `walletprocesspsbt` to include the BIP 32 derivation paths for keys that it is watching that are from a different HD wallet. In order to make this easier to use, a new field `hdmasterkeyfingerprint` has been added to `getaddressinfo`. Additionally I have removed `hdmasterkeyid` as was planned. I think that this API change is fine since it was going to be removed in 0.18 anyways. `CKeyMetadata` has also been extended to store key origin info to facilitate this. Tree-SHA512: 9c7794f3c793da57e23c5abbdc3d58779ee9dea3d53168bb86c0643a4ad5a11a446264961e2f772f35eea645048cb60954ed58050002caee4e43cd9f51215097
2019-02-14Import KeyOriginData when importing descriptorsAndrew Chow
2019-02-14Implement a function to add KeyOriginInfo to a walletAndrew Chow
2019-02-14Store key origin info in key metadataAndrew Chow
Store the master key fingerprint and derivation path in the key metadata. hdKeypath is kept to indicate the seed and for backwards compatibility, but all key derivation path output uses the key origin info instead of hdKeypath.
2019-02-14Merge #14481: Add P2SH-P2WSH support to listunspent RPCWladimir J. van der Laan
6ca836ab3abef5a90df0c3c4e4983f328b1afe00 Add release note for listunspent P2WSH change (MeshCollider) 928beae007fc2f951e79ea307a5e983af4cb3acf Add test for P2SH-P2WSH in signrawtransactionwithkey and listunspent (MeshCollider) 314784a60f18424b004e935aa6e41b824e9645b3 Make listunspent and signrawtransaction RPCs support witnessScript (MeshCollider) Pull request description: This is a reworked version of #11708 after #12427 and the `signrawtransaction` split. For a P2WSH address, listunspent should return the witness script, and for a P2SH-P2WSH address, it should also return the inner witness script (because SignTransaction will automatically wrap it in P2SH if required). Includes a test which also tests the behaviour of #12427, and release note. Tree-SHA512: a8e72cf16930312bf48ec47e44a68f8d7e26664043c1b4cc0983eb25aec4087e511188ff9a0f181cd7b8a0c068c60d7f1e7e3f226b79e8c48890039dcf57f7b7
2019-02-14Remove hdmasterkeyidAndrew Chow
2019-02-14Add a method to CWallet to write just CKeyMetadataAndrew Chow
2019-02-14Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}Andrew Chow
Creates new files util/bip32.h and util/bip32.cpp for containing BIP 32 stuff. Moves FormatKeyPath from descriptor.cpp to util/bip32. Adds a wrapper around it to prepent the 'm' for when just the BIP 32 style keypath is needed.
2019-02-14Refactor keymetadata writing to a separate methodAndrew Chow
2019-02-14Remove unused TransactionError constantsMarcoFalke
2019-02-14Merge #14978: Factor out PSBT utilities from RPCs for use in GUI code; ↵MeshCollider
related refactoring. 102faad81 Factor out combine / finalize / extract PSBT helpers (Glenn Willen) 78b9893d0 Remove op== on PSBTs; check compatibility in Merge (Glenn Willen) bd0dbe876 Switch away from exceptions in refactored tx code (Glenn Willen) c6c3d42a7 Move PSBT definitions and code to separate files (Glenn Willen) 81cd95884 Factor BroadcastTransaction out of sendrawtransaction (Glenn Willen) c734aaa15 Split DecodePSBT into Base64 and Raw versions (Glenn Willen) 162ffefd2 Add pf_invalid arg to std::string DecodeBase{32,64} (Glenn Willen) Pull request description: * Move most PSBT definitions into psbt.h. * Move most PSBT RPC utilities into psbt.{h,cpp}. * Move wallet-touching PSBT RPC utilities (FillPSBT) into wallet/psbtwallet.{h,cpp}. * Switch exceptions from JSONRPCError() to new PSBTException class. * Split DecodePSBT into DecodeBase64PSBT (old behavior) and DecodeRawPSBT. * Add one new version of DecodeBase64 utility in strencodings.h (and corresponding DecodeBase32 for completeness). * Factor BroadcastTransaction utility function out of sendrawtransaction RPC handler in rpc/rawtransaction.cpp Note: For those keeping score at home wondering why refactor, this is in anticipation of (and developed in parallel with) a change to actually introduce GUI use of all this stuff, which is already under development and working-ish. Tree-SHA512: 2197c448e657421f430943025357597e7b06c4c377d5d4b2622b9edea52a7193c48843dd731abb3a88ac4023a9c88d211991e0a9b740c22f2e1cbe72adefe390
2019-02-13Merge #15334: wallet: Log absolute paths for the walletsWladimir J. van der Laan
a4b92e467dd182621497deda1e80a9737629c75f Log full paths for wallets (Hennadii Stepanov) Pull request description: Fix #15333 `debug.log` with this PR: ``` ... 2019-02-03T19:02:35Z Using wallet directory /home/hebasto/.bitcoin/testnet3/wallets 2019-02-03T19:02:35Z init message: Verifying wallet(s)... 2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2019-02-03T19:02:35Z Using wallet test_alpha/wallet.dat 2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/test_alpha/db.log 2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2019-02-03T19:02:35Z Using wallet alpha_wallet/wallet.dat 2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/alpha_wallet/db.log 2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2019-02-03T19:02:35Z Using wallet wallet.dat 2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/db.log 2019-02-03T19:02:35Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2019-02-03T19:02:35Z Using wallet none/wallet.dat 2019-02-03T19:02:35Z BerkeleyEnvironment::Open: LogDir=/home/hebasto/.bitcoin/testnet3/wallets/none/database ErrorFile=/home/hebasto/.bitcoin/testnet3/wallets/none/db.log 2019-02-03T19:02:35Z init message: Loading banlist... ... ``` Tree-SHA512: 8dd4408d3f6b04f396dd0ae0d248fedc3a0f6d36788556ae1662443f06f2ecce1c2be9456bf8d1b3d25b29c2a0cfb03cb805bde0a40387e68988ab932e17e118
2019-02-13Merge #15390: [wallet-tool] Close bdb when flushing walletMarcoFalke
318b1f7af1 [wallet] Close bdb when flushing wallet. (John Newbery) Pull request description: bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true. Tree-SHA512: f722e527e4806eca5254221e944f57853d11bf89a9264309fa558a6cc2b23feefb7bb2963e87b4fad9cfb31ac4cffe563688988e0614a481a8ff1d393aceb132
2019-02-13Make listunspent and signrawtransaction RPCs support witnessScriptMeshCollider
2019-02-12Merge #14918: RPCHelpMan: Check default values are given at compile-timeMarcoFalke
fa0ad4e7ce RPCHelpMan: Check default values are given at compile-time (MarcoFalke) Pull request description: Remove the run time assertions on the default values and ensure that the correct default type and value is provided at compile time. Tree-SHA512: 80df2f3fab4379b500c773c27da63f22786c58be5963fe99744746320e43627a5d433eedf8b32209158df7805ebdce65ed4d242c829c4fe6e5d13deb4799ed42