aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
AgeCommit message (Collapse)Author
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-07-26Fix misleading "Method not found" multiwallet errorsRussell Yanofsky
Raise RPC_WALLET_NOT_SPECIFIED instead of RPC_METHOD_NOT_FOUND when a required wallet filename was not specified in an RPC call. Also raise more specific RPC_WALLET_NOT_FOUND error instead of RPC_INVALID_PARAMETER in case an invalid wallet was specified, for consistency.
2017-07-21listsinceblock: optionally find and list any transactions that were undone ↵Karl-Johan Alm
due to reorg when requesting a non-main chain block in a new 'removed' array.
2017-07-20Merge #10783: [RPC] Various rpc argument fixesWladimir J. van der Laan
4dc1915 check for null values in rpc args and handle appropriately (Gregory Sanders) 999ef20 importmulti options are optional (Gregory Sanders) a70d025 fixup some rpc param counting for rpc help (Gregory Sanders) Pull request description: Audited where named args will fail to use correct default values or may fail when additional optional arguments are added. Previously for these parameters, it was fine to omit them as positional arguments, but it would trigger UniValue runtime errors to set them to null, or to omit them while passing named parameters with greater positions (which would internally set earlier missing arguments to null). Now null values are treated the same as missing values so these errors do not occur. Included a few other small fixes while working on it. I didn't bother fixing account-based rpc calls. Tree-SHA512: 8baf781a35bd48de7878d4726850a580dab80323d3416c1c146b4fa9062f8a233c03f37e8ae3f3159e9d04a8f39c326627ca64c14e1cb7ce72538f934ab2ae1e
2017-07-20Merge #10571: [RPC]Move transaction combining from signrawtransaction to new RPCWladimir J. van der Laan
6b4f231 Move transaction combining from signrawtransaction to new RPC (Andrew Chow) Pull request description: Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time. The tests have been updated to test this. Tests for the signrawtransaction merge have also been removed. This is part of #10570 Tree-SHA512: 035aebbd6537c1c017d5c8e06d309228b4c23fe52d5b31ffde19741c81a11a6346ddbbdc582b77b02a47f4c22b1952b69d3c2ee1109c29b3f0f1b612d8de53ed
2017-07-19Merge #10857: [RPC] Add a deprecation warning to getinfo's outputWladimir J. van der Laan
1c9b818 getinfo deprecation warning (Andrew Chow) Pull request description: This is an alternative to #10841 This PR implements @gmaxwell's suggestion of a `nag` field for getinfo which warns about the deprecation. Instead of calling it `nag`, I have named it `deprecation-warning`. The output of `getinfo` will look like this: ``` { "version": 149900, "protocolversion": 70015, "walletversion": 139900, "balance": 0.00000000, "blocks": 476281, "timeoffset": 0, "connections": 2, "proxy": "", "difficulty": 804525194568.1318, "testnet": false, "keypoololdest": 1496858803, "keypoolsize": 197, "unlocked_until": 0, "paytxfee": 0.00000000, "relayfee": 0.00001000, "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications", "deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16" } ``` I think this should be tagged for 0.15 Tree-SHA512: ea1bac96a67f797519e8748ddd661cf0a1127cbc38f145b98f10cf9b54dcf0519b353062ce9888e1f51875497299c75ff5147566944451bc3fc117620e773489
2017-07-18getinfo deprecation warningAndrew Chow
2017-07-18Move transaction combining from signrawtransaction to new RPCAndrew Chow
Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time.
2017-07-18Avoid redundant redeclaration of GetWarnings(const string&)practicalswift
std::string GetWarnings(const std::string& strFor) is declared in warnings.h and defined in warnings.cpp.
2017-07-17Convert named argument from nblocks to conf_targetAlex Morcos
in estimatesmartfee and estimaterawfee. Also reuse existing bounds checking.
2017-07-17Improve api to estimatesmartfeeAlex Morcos
Change parameter for conservative estimates to be an estimate_mode string. Change to never return a -1 for failure but to instead omit the feerate and return an error string. Throw JSONRPC error on invalid nblocks parameter.
2017-07-17check for null values in rpc args and handle appropriatelyGregory Sanders
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-15Merge #10760: Avoid dereference-of-casted-pointerPieter Wuille
0aadc11fd Avoid dereference-of-casted-pointer (Pieter Wuille) Pull request description: And prefer a static_cast to the intended reference type. Tree-SHA512: e83b20023a4dca6029b46f7040a8a6fd54e1b42112ec0c87c3c3b567ed641de97a9e2335b57a2efb075491f641e5b977bc226a474276bea0c3c3c71d8d6ac54d
2017-07-14Properly bound check conf_target in wallet RPC callsAlex Morcos
2017-07-14Remove checking of mempool min fee from estimateSmartFee.Alex Morcos
This check has been moved to the wallet logic GetMinimumFee. The rpc call to estimatesmartfee will now no longer return a result maxed with the mempool min fee, but automated fee calculations from the wallet will produce the same result as before and coincontrol and sendcoins dialogs in the GUI will correctly display the right prospective fee. changes to policy/fees.cpp include a big whitespace indentation change.
2017-07-14Remove confusing MAX_BLOCK_BASE_SIZE.Gregory Maxwell
Some people keep thinking that MAX_BLOCK_BASE_SIZE is a separate size limit from the weight limit when it fact it is superfluous, and used in early tests before the witness data has been validated or just to compute worst case sizes. The size checks that use it would not behave any differently consensus wise if they were eliminated completely. Its correct value is not independently settable but is a function of the weight limit and weight formula. This patch just eliminates it and uses the scale factor as required to compute the worse case constants. It also moves the weight factor out of primitives into consensus, which is a more logical place for it.
2017-07-11Merge #10543: Change API to estimaterawfeeWladimir J. van der Laan
5e3b7b5 Improve error reporting for estimaterawfee (Alex Morcos) 1fafd70 Add function to report highest estimate target tracked per horizon (Alex Morcos) 9c85b91 Change API to estimaterawfee (Alex Morcos) Tree-SHA512: e624c6e7967e9e48abe49f5818bd674e5710e571cc093029d2f90d39fdfba3c1f30e83bf89f6dce97052b59a7d9636a64642ccfb26effd149c417d0afbed0c0b
2017-07-11Merge #10589: More economical fee estimates for RBF and RPC options to controlWladimir J. van der Laan
f135923 Add RPC options for RBF, confirmation target, and conservative fee estimation. (Alex Morcos) f0bf33d Change default fee estimation mode. (Alex Morcos) e0738e3 remove default argument from estimateSmartFee (Alex Morcos) d507c30 Introduce a fee estimate mode. (Alex Morcos) cfaef69 remove default argument from GetMinimumFee (Alex Morcos) Tree-SHA512: 49c3a49a6893790a7e8b4e93a48f123dd5307af26c2017800683b76b4df8fc904ba73402917878676242c7440e3e04288d0c1ff3c2c907418724efc03cedab50
2017-07-11Merge #10676: document script-based return fields for validateaddressWladimir J. van der Laan
f2f1d0a document script-based return fields for validateaddress (Gregory Sanders) Tree-SHA512: 3310bb82b63ef20e46dd7ebcc9e15828cc7b6767ef19ddd869eeb5e4ee5b31ee307d21a44a9c81dbfe9d031bd48219e3ee1d330fc7b343d63d5365b68639c062
2017-07-10Improve error reporting for estimaterawfeeAlex Morcos
2017-07-10Change API to estimaterawfeeAlex Morcos
Report results for all 3 possible time horizons instead of specifying time horizon as an argument.
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-10Merge #10747: [rpc] fix verbose argument for getblock in bitcoin-cliWladimir J. van der Laan
58e9864 [rpc] fix verbose argument for getblock in bitcoin-cli (John Newbery) Tree-SHA512: 7f176e1ddd9f3f7722ea0d268549629567ecf0c30bebf368824997566df0bfa01d31cf761abc9ca355e48c0bf0cb06d49d15a02b858999fcb7472dc7df2fbbf2
2017-07-07Avoid dereference-of-casted-pointerPieter Wuille
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-06Merge #10710: REST/RPC example updateWladimir J. van der Laan
b8bb425 REST/RPC example update (Michael Rotarius) Tree-SHA512: 3a7003f5996f58d9881e7b7a9155f8b1c233faea2977cd02c481567b60fa47105433184da3d887ef3ec28775ad33719b779bff2753d64b775b29d8a7a6214fda
2017-07-05Use "replaceable" instead of "optintorbf" in createrawtransaction.Matt Corallo
To be consistent with other places (and add the missing named args entry for it).
2017-07-05[rpc] fix verbose argument for getblock in bitcoin-cliJohn Newbery
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-03Merge #10683: rpc: Move the `generate` RPC call to rpcwalletWladimir J. van der Laan
2a96283 rpc: Update `generate` for developer notes (Wladimir J. van der Laan) df7e2f0 rpc: Move the `generate` RPC call to rpcwallet (Wladimir J. van der Laan) Tree-SHA512: ec658d6178f8435dc54b9d9c6dd59f873055a8ae0c3f177c02049d77b93107dd5fc17a1ff56d50f051810d52fdf306846eaba2ef4fc8d2a6cfa831f57a1045c4
2017-06-30document script-based return fields for validateaddressGregory Sanders
2017-06-30REST/RPC example updateMichael Rotarius
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-27Clarify CCoinsViewMemPool documentation.Matt Corallo
Thanks to @sdaftuar for correcting my misunderstanding.
2017-06-25[RPC] Add an uptime command that displays the amount of time that bitcoind ↵Ricardo Velhote
has been running
2017-06-24Merge #10627: fixed listunspent rpc convert parameterWladimir J. van der Laan
e503b2b fixed listunspent rpc convert parameter (tnaka) Tree-SHA512: 6da1cee8fd8459187825fad47678b36bbf6b4582f03f557c8a48c2c4273d9e12405e8bb6ade02a06e6555419eefb1dc298d4d4781ebb3b6b72743ca6108cb18e
2017-06-24Merge #10191: [trivial] Rename unused RPC arguments 'dummy'Wladimir J. van der Laan
0ef7de9 [RPCs] Remove submitblock parameters argument help text (John Newbery) Tree-SHA512: f39ad4bb3006e3d722fa51ae2ab4a48726e740993d6bed5737b355d1e0a99cf475ca9519f97adf8cde1b7187b14a24d5951ce4f34624d01d9ef84b49124c2894
2017-06-24Merge #10446: net: avoid extra dns query per seedWladimir J. van der Laan
c1be285 chainparams: make supported service bits option explicit (Cory Fields) d5c7c1c net: use an internal address for fixed seeds (Cory Fields) 6cdc488 net: switch to dummy internal ip for dns seed source (Cory Fields) 6d0bd5b net: do not allow resolving to an internal address (Cory Fields) 7f31762 net: add an internal subnet for representing unresolved hostnames (Cory Fields) Tree-SHA512: 9bf1042bef546ac3ef0e0d3a9a5555eb21628ff2674a0cf8c6367194b22bfdab477adf452c0e7c56f44e0fb37debc5e14bdb623452e076fb9c492c7702601d7a
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-19fixed listunspent rpc convert parametertnaka
2017-06-15Merge #10284: Always log debug information for fee calculation in ↵Wladimir J. van der Laan
CreateTransaction 1bebfc8 Output Fee Estimation Calculations in CreateTransaction (Alex Morcos) Tree-SHA512: e25a27f7acbbc3a666d5d85da2554c5aaec4c923ee2fdbcfc532c29c6fbdec3c9e0d6ae6044543ecc339e7bd81df09c8d228e0b53a2c5c2dae0f1098c9453272
2017-06-14net: add an internal subnet for representing unresolved hostnamesCory Fields
We currently do two resolves for dns seeds: one for the results, and one to serve in addrman as the source for those addresses. There's no requirement that the source hostname resolves to the stored identifier, only that the mapping is unique. So rather than incurring the second lookup, combine a private subnet with a hash of the hostname. The resulting v6 ip is guaranteed not to be publicy routable, and has only a negligible chance of colliding with a user's internal network (which would be of no consequence anyway).
2017-06-14[RPCs] Remove submitblock parameters argument help textJohn Newbery
2017-06-14Merge #9738: gettxoutproof() should return consistent resultWladimir J. van der Laan
6294f32 gettxoutproof() should return consistent result (John Newbery) Tree-SHA512: 1c36f78ea07a3bdde09e9494207b4372d54bcd94ed2d56e339e78281f6693e26a93e4c3123453d5c0f6e994d0069d5a1c806786c4af71864f87ea4841611c379
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-13Output Fee Estimation Calculations in CreateTransactionAlex Morcos
2017-06-13Merge #10553: Simplify "bool x = y ? true : false". Remove unused function ↵Wladimir J. van der Laan
and trailing semicolon. 67ca816 Simplify "bool x = y ? true : false" to "bool x = y" (practicalswift) 9f841a6 [tests] Remove accidental trailing semicolon (practicalswift) 30c2d9d [tests] Remove unused function InsecureRandBytes(size_t len) (practicalswift) Tree-SHA512: ae62c255c88133cad12084b6011c105bb96b729c8103330350683d9c20020c5d7617693795df4dff6cc305f2405cb2e4e2ece182d6e6d7c3c8db82aa2f882c41
2017-06-12Remove unnecessary forward class declarations in header filespracticalswift