aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
AgeCommit message (Collapse)Author
2017-12-20Add CScripts to dumpwallet RPCMeshCollider
2017-12-14Merge #10839: Don't use pass by reference to const for cheaply-copied types ↵Wladimir J. van der Laan
(bool, char, etc.) 99ba0c3 Don't use pass by reference to const for cheaply-copied types (bool, char, etc.). (practicalswift) Pull request description: Don't use pass by reference to const for cheaply-copied types (`bool`, `char`, etc.). Tree-SHA512: ccad5e2695dff0b3d6de3e713ff3448f2981168cdac72d73bee10ad346b9919d8d4d588933369e54657a244b8b222fa0bef919bc56d983e1fa64b2004e51b225
2017-11-22clarify abortrescan rpc useGregory Sanders
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
2017-11-09Merge #10368: [wallet] Remove helper conversion operator from walletWladimir J. van der Laan
5a5e4e9 [wallet] Remove CTransaction&() helper conversion operator from wallet implementation. (Karl-Johan Alm) Pull request description: The `CTransaction&()` operator in `CMerkleTx` makes conversion into `CTransaction`s transparent, but was marked as to-be-removed in favor of explicitly getting the `tx` ivar, presumably as the operator can lead to ambiguous behavior and makes the code harder to follow. This PR removes the operator and adapts callers. This includes some cases of `static_cast<CTransaction>(wtx)` → `*wtx.tx`, which is definitely an improvement. Tree-SHA512: 95856fec7194d6a79615ea1c322abfcd6bcedf6ffd0cfa89bbdd332ce13035fa52dd4b828d20df673072dde1be64b79c513529a6f422dd5f0961ce722a32d56a
2017-11-08Merge #11289: Add wallet backup text to import* and add* RPCsWladimir J. van der Laan
c098c58 Wrap dumpwallet warning and note scripts aren't dumped (MeshCollider) a38bfbc Add wallet backup text to import*, add* and dumpwallet RPCs (MeshCollider) Pull request description: Closes https://github.com/bitcoin/bitcoin/issues/11243 Adds "Requires a new wallet backup" text to `addwitnessaddress`, `importprivkey`, `importmulti`, `importaddress`, `importpubkey`, and `addmultisigaddress`. Also adds a warning to `dumpwallet` that backing up the seed alone is not sufficient to back up non-HD addresses Tree-SHA512: 76d7cdca54d5b458acf479154620322391b889922525fddd6153f4164cfee393ad743757400cb8f6b1b30f24947df68ea9043b4e509f7df77a8fa05dda370933
2017-10-19Wrap dumpwallet warning and note scripts aren't dumpedMeshCollider
2017-10-14Add wallet backup text to import*, add* and dumpwallet RPCsMeshCollider
2017-10-11Fix importmulti bug when importing an already imported keyPedro Branco
2017-10-09Update importprivkey named args documentationDusty Williams
Fixes #11462. Updated documentation for importprivkey function to use the correct name for the first argument. Also updates a call to importprivkey to use named args in functional test.
2017-09-26rpc: Prevent `dumpwallet` from overwriting filesWladimir J. van der Laan
Prevent arbitrary files from being overwritten. There have been reports that users have overwritten wallet files this way. It may also avoid other security issues. Fixes #9934. Adds mention to release notes and adds a test.
2017-09-06Introduce wrappers around CBitcoinAddressPieter Wuille
This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
2017-08-29rpc: Push down safe mode checksAndrew Chow
This contains most of the changes of 10563 "remove safe mode", but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in individual calls with okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com>
2017-08-14Don't use pass by reference to const for cheaply-copied types (bool, char, ↵practicalswift
etc.).
2017-08-04[wallet] Cache keyid -> keypool id mappingsJohn Newbery
2017-07-17check for null values in rpc args and handle appropriatelyGregory Sanders
2017-07-17importmulti options are optionalGregory Sanders
2017-07-04Merge #10193: scripted-diff: Remove #include <boost/foreach.hpp>Wladimir J. van der Laan
b1268a1 clang-format: Delete ForEachMacros (Jorge Timón) 5995735 scripted-diff: Remove #include <boost/foreach.hpp> (Jorge Timón) 3eff827 scripted-diff: Remove BOOST_REVERSE_FOREACH (Jorge Timón) 33aed5b Fix const_reverse_iterator constructor (pass const ptr) (Jorge Timón) 300851e Introduce src/reverse_iterator.hpp and include it... (Jorge Timón) Tree-SHA512: df3405328e9602d0a433ac134ba59a5c9a6202ef64188df2f94a59b2ce58dec7c988b25d0671c7937de516a96b2e6daeb9d04c82fa363b616ee4cf6e9cb0fac6
2017-07-03fix typo in help text for removeprunedfundsAkio Nakamura
2017-06-24Merge #10412: Improve wallet rescan APIWladimir J. van der Laan
deaf48b Handle TIMESTAMP_WINDOW within CWallet::RescanFromTime (Russell Yanofsky) 5b2be2b Make CWallet::RescanFromTime comment less ambiguous (Russell Yanofsky) 9bb66ab Add RescanFromTime method and use from rpcdump (Russell Yanofsky) ccf84bb Move birthday optimization out of ScanForWalletTransactions (Russell Yanofsky) Tree-SHA512: cd38433b8f5c5e44ecfba830a6a26bd9a9d0f4a22ae42bce17773d1a6fb25e1ee4289484996dad2d7acfa03059917ff062459f25030a761da7083ba5fbc87bc9
2017-06-22Handle TIMESTAMP_WINDOW within CWallet::RescanFromTimeRussell Yanofsky
This way CWallet::RescanFromTime callers don't need to subtract TIMESTAMP_WINDOW themselves. This is pure refactoring, there is no change in behavior.
2017-06-22Fixed multiple typosDimitris Tsapakidis
A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
2017-06-22scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón
-BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
2017-06-13Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille
1238f13cf scripted-diff: Remove PAIRTYPE (Jorge Timón) 18dc3c396 scripted-diff: Remove Q_FOREACH (Jorge Timón) 7c00c2672 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón) a5410ac5e Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
2017-06-06Use list initialization (C++11) for maps/vectors instead of ↵practicalswift
boost::assign::map_list_of/list_of
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-06-05Merge #9740: Add friendly output to dumpwalletWladimir J. van der Laan
164019d Add dumpwallet output test (aideca) 9f82134 Add friendly output to dumpwallet refs #9564 (aideca) Tree-SHA512: 913fcf18d42eebe34173f1f2519973494b1ad2d86d125ff4bf566d6c64aa501c02f8831e6f44812cd87a46916f61c6f510146af406865b31856d8336c173569f
2017-06-05Add RescanFromTime method and use from rpcdumpRussell Yanofsky
No change in behavior.
2017-06-05Merge #10403: Fix importmulti failure to return rescan errorsWladimir J. van der Laan
4d2d604 Fix importmulti failure to return rescan errors (Russell Yanofsky) Tree-SHA512: e5e6d6c5a2bb7230e1bcac1903a4b766cd57bf781fade50c6c9cd5713cd3e768db0987cfda9699b57a53d3a0a60951b96dce5283b3d3ec1f954162c439bc932b
2017-05-27Fixing typo in rpcdump.cppJames Evans
2017-05-16Fix importwallet edge case rescan bugRussell Yanofsky
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.
2017-05-15Fix importmulti failure to return rescan errorsRussell Yanofsky
An off-by-one-block bug in importmulti rescan logic could cause it to return success in an edge case even when a rescan was not successful. The case where this would happen is if there were multiple blocks in a row with the same GetBlockTimeMax() value, and the last block was scanned successfully, but one or more of the earlier blocks was not readable.
2017-05-09[wallet] Remove CTransaction&() helper conversion operator from wallet ↵Karl-Johan Alm
implementation.
2017-04-18Merge #10208: [wallet] Rescan abortabilityWladimir J. van der Laan
9141622 [rpc] Add abortrescan command to RPC interface. (Kalle Alm) 75a08e7 [wallet] Add support for aborting wallet transaction rescans. (Kalle Alm) Tree-SHA512: 18545a1dc48c6dc112993f971f3adc7c0341fa621186c6d70bef1052e1d127ca116c5769595d721a209d502ca2019f2ad33876fe35d2b17216393404607a6c76
2017-04-18[rpc] Add abortrescan command to RPC interface.Kalle Alm
2017-04-13Clarify importprivkey help text with example of blank label without rescanWarren Togami
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.
2017-04-13Add friendly output to dumpwallet refs #9564aideca
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-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-08Refactor: Remove using namespace <xxx> from wallet/Karl-Johan Alm
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-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-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-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-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-27RPC: Do all wallet access through new GetWalletForJSONRPCRequestLuke Dashjr
2017-02-27RPC/Wallet: Pass CWallet as pointer to helper functionsLuke Dashjr