aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
AgeCommit message (Collapse)Author
2017-07-17Merge #10706: Improve wallet fee logic and fix GUI bugsWladimir J. van der Laan
11590d3 Properly bound check conf_target in wallet RPC calls (Alex Morcos) fd29d3d Remove checking of mempool min fee from estimateSmartFee. (Alex Morcos) 2fffaa9 Make QT fee displays use GetMinimumFee instead of estimateSmartFee (Alex Morcos) 1983ca6 Use CoinControl to pass custom fee setting from QT. (Alex Morcos) 03ee701 Refactor to use CoinControl in GetMinimumFee and FeeBumper (Alex Morcos) ecd81df Make CoinControl a required argument to CreateTransaction (Alex Morcos) Pull request description: This builds on #10589 (first 5 commits from that PR, last 5 commits are new) The first couple commits refactor to use the CCoinControl class to pass fee calculation parameters around. This allows for fixing the buggy interaction in QT between the global payTxFee which can be modified by the RPC call settxfee or temporarily modified by the QT custom fee settings. Before these changes the GUI could sometimes send a transaction with a recently set payTxFee and not respect the settings displayed in the GUI. After these changes, using the GUI does not involve the global transaction confirm target or payTxFee. The prospective fee displays in the smart fee slider and the coin control dialog are changed to use the fee calculation from GetMinimumFee, this simplifies the code and makes them slightly more correct in edge cases. Maxing the fee calculation with the mempool min fee is move from estimateSmartFee to GetMinimumFee. This fixes a long standing bug, and should be tagged for 0.15 as it is holding up finalizing the estimatesmartfee RPC API before release. Tree-SHA512: 4d36a1bd5934aa62f3806d380fcafbef73e9fe5bdf190fc5259a3e3a13349e5ce796e50e7068c46dc630ccf56d061bce5804f0bfe2e082bb01ca725b63efd4c1
2017-07-14Properly bound check conf_target in wallet RPC callsAlex Morcos
2017-07-14Refactor to use CoinControl in GetMinimumFee and FeeBumperAlex Morcos
Improve parameter precedence in coin_control
2017-07-14Make CoinControl a required argument to CreateTransactionAlex Morcos
2017-07-12getbalance example covers at least 6 confirmsGregory Sanders
2017-07-10Add RPC options for RBF, confirmation target, and conservative fee estimation.Alex Morcos
Add support for setting each of these attributes on a per RPC call basis to sendtoaddress, sendmany, fundrawtransaction (already had RBF), and bumpfee (already had RBF and conf target).
2017-07-06Merge #10698: Be consistent in calling transactions "replaceable" for Opt-In RBFWladimir J. van der Laan
73c942e Use "replaceable" instead of "rbfoptin" in bitcoin-tx. (Matt Corallo) fb915d5 Use "replaceable" instead of "optIntoRbf" in fundrawtransaction. (Matt Corallo) 928c681 Use "replaceable" instead of "optintorbf" in createrawtransaction. (Matt Corallo) Tree-SHA512: 8922451c00abb63aaa08b4a9e314e89c22233b32f207259fbc25367f7d5b67efbaccc7e2a4958c18611ad498da302296242860c7be965a0e996dcde3e89efa07
2017-07-05Use "replaceable" instead of "optIntoRbf" in fundrawtransaction.Matt Corallo
To be consistent with other RPCs
2017-06-29rpc: Update `generate` for developer notesWladimir J. van der Laan
Fix nits by John Newbery.
2017-06-29rpc: Move the `generate` RPC call to rpcwalletWladimir J. van der Laan
This makes it possible to mine to any wallet when multi-wallet mode is added. Solves the same problem as #10649, but IMO in a cleaner way. It also gets rid of the circuitous `ScriptForMining` method on `CValidationInterface`, which really doesn't belong there. After this change it's still possible to mine without wallet through `generatetoaddress`.
2017-06-20Merge #10536: Remove unreachable or otherwise redundant codePieter Wuille
4265bf351 Remove unreachable or otherwise redundant code (practicalswift) Tree-SHA512: bc9666ab5d20c936d78c50c0361405aca9edd116602aa9bcd71a79a904b647ac9eca0651d1a9d530189a6ac1c4e235bfc69ec1a68f7e36cc14d6848ac2206b7b
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-12Remove unreachable or otherwise redundant codepracticalswift
2017-06-12Merge #8694: Basic multiwallet supportWladimir J. van der Laan
c237bd7 wallet: Update formatting (Luke Dashjr) 9cbe8c8 wallet: Forbid -salvagewallet, -zapwallettxes, and -upgradewallet with multiple wallets (Luke Dashjr) a2a5f3f wallet: Base backup filenames on original wallet filename (Luke Dashjr) b823a4c wallet: Include actual backup filename in recovery warning message (Luke Dashjr) 84dcb45 Bugfix: wallet: Fix warningStr, errorStr argument order (Luke Dashjr) 008c360 Wallet: Move multiwallet sanity checks to CWallet::Verify, and do other checks on all wallets (Luke Dashjr) 0f08575 Wallet: Support loading multiple wallets if -wallet used more than once (Luke Dashjr) b124cf0 Wallet: Replace pwalletMain with a vector of wallet pointers (Luke Dashjr) 19b3648 CWalletDB: Store the update counter per wallet (Luke Dashjr) 74e8738 Bugfix: ForceSetArg should replace entr(ies) in mapMultiArgs, not append (Luke Dashjr) 23fb9ad wallet: Move nAccountingEntryNumber from static/global to CWallet (Luke Dashjr) 9d15d55 Bugfix: wallet: Increment "update counter" when modifying account stuff (Luke Dashjr) f28eb80 Bugfix: wallet: Increment "update counter" only after actually making the applicable db changes to avoid potential races (Luke Dashjr) Tree-SHA512: 23f5dda58477307bc07997010740f1dc729164cdddefd2f9a2c9c7a877111eb1516d3e2ad4f9b104621f0b7f17369c69fcef13d28b85cb6c01d35f09a8845f23
2017-06-09Remove duplicate includespracticalswift
2017-06-08Merge #10545: Use list initialization (C++11) for maps/vectors instead of ↵Wladimir J. van der Laan
boost::assign::map_list_of/list_of 3fb81a8 Use list initialization (C++11) for maps/vectors instead of boost::assign::map_list_of/list_of (practicalswift) Tree-SHA512: 63a9ac9ec5799472943dce1cd92a4b14e7f1fe12758a5fc4b1efceaf2c85a4ba71dad5ccc50813527f18b192e7714c076e2478ecd6ca0d452b24e88416f872f7
2017-06-06Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr
2017-06-06Use list initialization (C++11) for maps/vectors instead of ↵practicalswift
boost::assign::map_list_of/list_of
2017-06-05RPC/Wallet: Add RBF support for fundrawtransactionLuke Dashjr
2017-06-05Wallet: Refactor FundTransaction to accept parameters via CCoinControlLuke Dashjr
2017-06-05scripted-diff: Remove PAIRTYPEJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT-
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 #10455: Simplify feebumper minimum fee code slightlyWladimir J. van der Laan
88b8f0b Simplify feebumper minimum fee code slightly (Russell Yanofsky) Tree-SHA512: 4465daef63936860d016a7fd7fd31ce62878d87cb943a90f321b07a40accdc5e7970d99de46b2bc924eb0b422144d6f01649855949395518790ecd05d300ee52
2017-05-25Simplify feebumper minimum fee code slightlyRussell Yanofsky
No change in behavior. Get rid of specifiedConfirmTarget if/else block and rename specifiedConfirmTarget and ignoreUserSetFee variables to ignoreGlobalPayTxFee.
2017-05-24Fix bumpfee rpc "errors" return valueRussell Yanofsky
2017-05-17Merge #10413: Fix docs (there's no rpc command setpaytxfee)Wladimir J. van der Laan
0f1b26a Fix docs (there's no rpc command setpaytxfee) (Ryan Havar) Tree-SHA512: 5b9e1f16e172e712452873f82faa35f3ac949cd1df6e2ee7e2282fc8fad4eaf4548ebf05407426547ad859360ae837172e6343d66f8d302c7f5b097f39bb3994
2017-05-17Add query options to listunspent rpc callPedro Branco
2017-05-16Fix docs (there's no rpc command setpaytxfee)Ryan Havar
2017-05-11Merge #10341: rpc/wallet: Workaround older UniValue which returns a ↵Wladimir J. van der Laan
std::string temporary for get_str a637734 rpc/wallet: Workaround older UniValue which returns a std::string temporary for get_str (Luke Dashjr) Tree-SHA512: 8f03f1d301f714f700bf64e259a1c986136fd1ac532f091aa97198a39c131290c320094f4fc38c774c8db4469a75437596b1d933300e4f04037abc158a252bad
2017-05-05rpc/wallet: Workaround older UniValue which returns a std::string temporary ↵Luke Dashjr
for get_str
2017-05-03Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus moduleJorge Timón
...from amount.o to policy/feerate.o Policy, because it moves policy code to the policy directory (common module)
2017-04-26[wallet] Remove unneeded legacy getbalance codeRussell Yanofsky
2017-04-26[wallet] Add GetLegacyBalance method to simplify getbalance RPCRussell Yanofsky
This adds a simpler new implementation of getbalance logic along with asserts to confirm it behaves identically to the old logic. The old logic is removed in the next commit.
2017-04-24Merge #9951: Wallet database handling abstractions/simplificationsWladimir J. van der Laan
911a480 wallet: Add comment describing the various classes in walletdb.h (Wladimir J. van der Laan) 69d2e9b wallet: Make IsDummy private in CWalletDBWrapper (Wladimir J. van der Laan) 3323281 wallet: CWalletDB CDB composition not inheritance (Wladimir J. van der Laan) be9e1a9 wallet: Reduce references to global bitdb environment (Wladimir J. van der Laan) 071c955 wallet: Get rid of fFileBacked (Wladimir J. van der Laan) 71afe3c wallet: Introduce database handle wrapper (Wladimir J. van der Laan) Tree-SHA512: e4e72953c61a2f6995d609a32f8ed8e18cab9a92bc9e193d46a1d1f06d9daa5c6da6fce2867d4e3ba4fc0439141901a3d35f246486f0fa8f59587786379dfcbd
2017-04-20Merge #10181: Include cleanupWladimir J. van der Laan
1c897fc Missing includes (Jorge Timón) a1fd450 Trivial: Remove unneeded includes from .h: (Jorge Timón) Tree-SHA512: ada3e62cc2435e58172a88b380be371b717a05725956c15e5493b6e19fe2903e5e6e43fd22dc24699333a0e8a0c7b42eb1ae61b41cb4ba82495be18e2d4ef3c6
2017-04-20Merge #9942: Refactor CBlockPolicyEstimatorWladimir J. van der Laan
68af651 MOVEONLY: move TxConfirmStats to cpp (Alex Morcos) 2332f19 Initialize TxConfirmStats in constructor (Alex Morcos) 5ba81e5 Read and Write fee estimate file directly from CBlockPolicyEstimator (Alex Morcos) 14e10aa Call estimate(Smart)Fee directly from CBlockPolicyEstimator (Alex Morcos) dbb9e36 Give CBlockPolicyEstimator it's own lock (Alex Morcos) f6187d6 Make processBlockTx private. (Alex Morcos) ae7327b Make feeEstimator its own global instance of CBlockPolicyEstimator (Alex Morcos) Tree-SHA512: dbf3bd2b30822e609a35f3da519b62d23f8a50e564750695ddebd08553b4c01874ae3e07d792c6cc78cc377d2db33b951ffedc46ac7edaf5793f9ebb931713af
2017-04-20wallet: Introduce database handle wrapperWladimir J. van der Laan
Abstract database handle from explicit strFilename into CWalletDBWrapper. Also move CWallet::Backup to db.cpp - as it deals with representation details this is a database specific operation.
2017-04-18[rpc] Add abortrescan command to RPC interface.Kalle Alm
2017-04-13Missing includesJorge Timón
2017-04-10Call estimate(Smart)Fee directly from CBlockPolicyEstimatorAlex Morcos
2017-04-02Improve CFeeBumper interface, add comments, make use of std::moveJonas Schnelli
2017-04-02Restore invalid fee check (must be > 0)Jonas Schnelli
2017-04-02Refactor Bumpfee core functionalityJonas Schnelli
2017-04-02Bumpfee move request parameter interaction to the topJonas Schnelli
2017-04-01Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell
This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
2017-03-28Fix rebase issue where pwalletMain was used instead of pwalletJonas Schnelli
Ser./Deser. nInternalChainCounter as last element
2017-03-24Fix superfluous cast and code style nits in RPC wallet-hd.py testJonas Schnelli
2017-03-24Only show keypoolsize_hd_internal if HD split is enabledJonas Schnelli
2017-03-24Switch to 100% for the HD internal keypool sizeJonas Schnelli
2017-03-24Fix wrong keypool internal size in RPC getwalletinfo helpJonas Schnelli