aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcdump.cpp
AgeCommit message (Collapse)Author
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-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
2017-02-27Fix importmulti returning rescan errors for wrong keysRussell Yanofsky
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"
2017-02-22Merge #9773: Return errors from importmulti if complete rescans are not ↵Wladimir J. van der Laan
successful e2e2f4c Return errors from importmulti if complete rescans are not successful (Russell Yanofsky)
2017-02-17Return errors from importmulti if complete rescans are not successfulRussell Yanofsky
2017-02-17[wallet] Remove importmulti always-true checkRussell Yanofsky
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.
2017-02-16Use 2 hour grace period for key timestamps in importmulti rescansRussell Yanofsky
Gregory Maxwell <greg@xiph.org> 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.
2017-02-15Merge #9756: Return error when importmulti called with invalid address.Wladimir J. van der Laan
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
2017-02-13Return error when importmulti called with invalid address.Russell Yanofsky
Lack of error checking noticed by Alex Morcos <morcos@chaincode.com>
2017-02-10Use importmulti timestamp when importing watch only keysRussell Yanofsky
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.
2017-02-10Dedup nTimeFirstKey update logicRussell Yanofsky
Also make nTimeFirstKey member variable private. This is just a cleanup change, it doesn't change behavior in any significant way.
2017-02-10Use MTP for importmulti "now" timestampsRussell Yanofsky
2017-02-10Require timestamps for importmulti keysRussell Yanofsky
Additionally, accept a "now" timestamp, to allow avoiding rescans for keys which are known never to have been used. Note that the behavior when "now" is specified is slightly different than the previous behavior when no timestamp was specified at all. Previously, when no timestamp was specified, it would avoid rescanning during the importmulti call, but set the key's nCreateTime value to 1, which would not prevent future block reads in later ScanForWalletTransactions calls. With this change, passing a "now" timestamp will set the key's nCreateTime to the current block time instead of 1. Fixes #9491
2017-01-12Replace FindLatestBefore used by importmuti with FindEarliestAtLeast.Gregory Maxwell
In spite of the name FindLatestBefore used std::lower_bound to try to find the earliest block with a nTime greater or equal to the the requested value. But lower_bound uses bisection and requires the input to be ordered with respect to the comparison operation. Block times are not well ordered. I don't know what lower_bound is permitted to do when the data is not sufficiently ordered, but it's probably not good. (I could construct an implementation which would infinite loop...) To resolve the issue this commit introduces a maximum-so-far to the block indexes and searches that. For clarity the function is renamed to reflect what it actually does. An issue that remains is that there is no grace period in importmulti: If a address is created at time T and a send is immediately broadcast and included by a miner with a slow clock there may not yet have been any block with at least time T. The normal rescan has a grace period of 7200 seconds, but importmulti does not.
2017-01-05rpc: Argument name consistencyWladimir J. van der Laan
The meaning is clear from the context, and we're inconsistent here. Also save typing when using named arguments. - `bitcoinaddress` -> `address` - `bitcoinprivkey` -> `privkey` - `bitcoinpubkey` -> `pubkey`
2017-01-05rpc: Named arguments for wallet callsWladimir J. van der Laan
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-02Make DecodeHexTx return a CMutableTransactionPieter Wuille
2016-12-02Make CWalletTx store a CTransactionRef instead of inheritingPieter Wuille
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-11-10Initialize variable to prevent compiler warningPavel Janík
2016-11-07Merge #8981: Wshadow: Do not shadow argument with a local variableWladimir J. van der Laan
ff6639b Do not shadow local variable (Pavel Janík)
2016-10-20Do not shadow local variablePavel Janík
2016-10-20RPC: importmulti: Avoid using boost::variant::operator!=, which is only in ↵Luke Dashjr
newer boost versions
2016-10-19Add consistency check to RPC call importmultiPedro Branco
2016-10-19Add importmulti rpc callPedro Branco
2016-10-19[RPC] Give RPC commands more information about the RPC requestJonas Schnelli
2016-09-20[Wallet] remove "unused" ThreadFlushWalletDB from removeprunedfundsJonas Schnelli
2016-08-24[wallet] rpc: Drop misleading optionMarcoFalke
2016-07-29Remove CWalletDB* parameter from CWallet::AddToWalletPatrick Strateman
2016-07-29Split CWallet::AddToWallet into AddToWallet and LoadToWallet.Patrick Strateman
This removes the fFromLoadWallet flag in AddToWallet. These were already effectively two methods.
2016-07-27[Wallet] add HD xpriv to dumpwalletJonas Schnelli
2016-06-20Merge #7687: Stop treating importaddress'ed scripts as changeWladimir J. van der Laan
595b22e Stop treating importaddress'ed scripts as change (Pieter Wuille)
2016-06-09build: Get rid of `CLIENT_DATE`Wladimir J. van der Laan
Putting the build date in the executable is a practice that has no place in these days, now that deterministic building is increasingly common. Continues #7732 which did this for the GUI.
2016-06-02Stop treating importaddress'ed scripts as changePieter Wuille
Before this, if someone imported a scriptPubKey directly (in hex form) using importaddress, outputs sending to it would be treated as change, as the corresponding CTxDestination was not added to the address book. Fix this by trying to detect scriptPubKeys that are in fact convertible to a CTxDestination and add them anyway. Add a warning to the RPC help to warn against importing raw non-standard scripts.
2016-03-23Added companion removeprunedfunds call.instagibbs
2016-03-23Add importprunedfunds rpc callinstagibbs
2016-03-21Correct importaddress help reference to importpubkeyDenis Lukianov
2016-01-21move rpc* to rpc/Daniel Cousens
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-10-01[Univalue] add univalue over subtreeJonas Schnelli
similar to secp256k1 include and compile univalue over a subtree
2015-09-07Enable wallet key imports without rescan in pruned mode.Gregory Maxwell
Complete rescan is incompatible with pruning, but rescan is optional on our wallet key import RPCs. Import on use is very useful in some common situations in conjunction with pruning, e.g. merchant payment tracking. This reenables importprivkey/importaddress/importpubkey when rescan is not used. In the future we should consider changing the rescan argument to allow depth or date to allow limited rescanning when compatible with the retained block depth.
2015-08-14Merge pull request #6415Wladimir J. van der Laan
d042854 SQUASH "Implement watchonly support in fundrawtransaction" (Matt Corallo) 428a898 SQUASH "Add have-pubkey distinction to ISMINE flags" (Matt Corallo) 6bdb474 Implement watchonly support in fundrawtransaction (Matt Corallo) f5813bd Add logic to track pubkeys as watch-only, not just scripts (Matt Corallo) d3354c5 Add have-pubkey distinction to ISMINE flags (Matt Corallo) 5c17059 Update importaddress help to push its use to script-only (Matt Corallo) a1d7df3 Add importpubkey method to import a watch-only pubkey (Matt Corallo) 907a425 Add p2sh option to importaddress to import redeemScripts (Matt Corallo) 983d2d9 Split up importaddress into helper functions (Matt Corallo) cfc3dd3 Also remove pay-2-pubkey from watch when adding a priv key (Matt Corallo)
2015-07-23TRIVIAL: Missing includesJorge Timón