aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change count type used by `gettxoutsetinfo`Ross Nicoll2021-06-081-0/+15
| | | | changing CAmount (is a int64_t) to arith_uint256 for nTotalAmount in CCoinsStats to prevent overflow
* 1.21 key prefix (#1710)Ross Nicoll2021-03-041-3/+3
| | | | | | | | | | | Squash-merged on request. * Dogecoin address prefixes * Use "doge" for BECH32 addresses * Switch Bitcoin references to Dogecoin in Travis * Update addresses in dogecoin-tx tests * Use "doge" for BECH32 addresses * Remove functional tests which do not apply to Dogecoin (backwards compatibility tests do not have suitable clients to test against)
* refactor: Pass NodeContext to RPC and REST methods through util::RefRussell Yanofsky2020-05-131-3/+11
| | | | This commit does not change behavior
* scripted-diff: Bump copyright headersMarcoFalke2020-04-161-1/+1
| | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT-
* scripted-diff: Sort test includesMarcoFalke2020-04-161-1/+1
| | | | | | | | | -BEGIN VERIFY SCRIPT- # Mark all lines with #includes sed -i --regexp-extended -e 's/(#include <.*>)/\1 /g' $(git grep -l '#include' ./src/bench/ ./src/test ./src/wallet/test/) # Sort all marked lines git diff -U0 | ./contrib/devtools/clang-format-diff.py -p1 -i -v -END VERIFY SCRIPT-
* node: Use mempool from node context instead of globalMarcoFalke2019-12-051-4/+0
|
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
* Pass NodeContext, ConnMan, BanMan references more placesRussell Yanofsky2019-10-281-2/+2
| | | | So g_connman and g_banman globals can be removed next commit.
* scripted-diff: Rename InitInterfaces to NodeContextRussell Yanofsky2019-10-281-4/+4
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; } s 'struct InitInterfaces' 'struct NodeContext' s 'InitInterfaces interfaces' 'NodeContext node' s 'InitInterfaces& interfaces' 'NodeContext\& node' s 'InitInterfaces m_interfaces' 'NodeContext m_context' s 'InitInterfaces\* g_rpc_interfaces' 'NodeContext* g_rpc_node' s 'g_rpc_interfaces = &interfaces' 'g_rpc_node = \&node' s 'g_rpc_interfaces' 'g_rpc_node' s 'm_interfaces' 'm_context' s 'interfaces\.chain' 'node.chain' s '\(AppInitMain\|Shutdown\|Construct\)(interfaces)' '\1(node)' s 'init interfaces' 'chain clients' -END VERIFY SCRIPT-
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-1/+1
| | | | unused includes in tests
* Make reasoning about dependencies easier by not including unused dependenciespracticalswift2019-06-021-2/+0
|
* scripted-diff: Bump copyright headers in test, benchMarcoFalke2019-04-111-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
* scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke2019-04-111-1/+1
| | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
* Remove use of CRPCTable::appendCommand in wallet codeRussell Yanofsky2019-03-051-3/+2
| | | | This commit does not change behavior.
* rpc: Avoid creating non-standard raw transactionsMarcoFalke2018-12-061-3/+0
|
* Pass chain and client variables where neededRussell Yanofsky2018-11-061-0/+7
| | | | | | | | | This commit does not change behavior. All it does is pass new function parameters. It is easiest to review this change with: git log -p -n1 -U0 --word-diff-regex=.
* Replace median fee rate with feerate percentilesMarcin Jachymiak2018-08-111-0/+80
| | | | | | Removes medianfeerate result from getblockstats. Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th, 75th, and 90th percentile weight unit in the block.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Make tests pass after 2020Bernhard M. Wiedemann2018-04-231-2/+2
| | | | also test that 64 bit integers are properly handled
* test: Fix sign for expected valuesKarl-Johan Alm2018-04-111-3/+3
| | | | A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
* Merge #11872: [rpc] createrawtransaction: Accept sorted outputsWladimir J. van der Laan2018-03-131-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fac70134a rpc: Update createrawtransaction examples (MarcoFalke) fa06dfce0 [rpc] createrawtransaction: Accept sorted outputs (MarcoFalke) 8acd25d85 rpc: Allow typeAny in RPCTypeCheck (MarcoFalke) Pull request description: The second parameter of the `createrawtransaction` is a dictionary of the outputs. This comes with at least two drawbacks: * In case of duplicate keys, either of them might silently disappear, with no user feedback at all. A user needs to make other mistakes, but this could eventually lead to abnormal tx fees. * A dictionary does not guarantee that keys are sorted. Again, a user needs to keep this in mind, as it could eventually lead to excessive tx fees. Even though my scenario of loss-of-funds is unlikely to happen, I see it as a inconvenience that should be fixed. Tree-SHA512: cd562f34f7f9f79c7d3433805971325c388c2035611be283980f4049066a622df4f0afdc11d7ac96662260ec0115147cb65e1ab5268f5a1b063242f3fe425f77
| * [rpc] createrawtransaction: Accept sorted outputsMarcoFalke2018-03-071-1/+0
| |
* | Split key_io (address/key encodings) off from base58Pieter Wuille2018-02-191-1/+1
|/
* Split signrawtransaction into wallet and non-walletAndrew Chow2018-02-171-10/+2
| | | | | | | | | Splits signrwatransaction into a wallet version (signrawtransactionwithwallet) and non-wallet version (signrawtransactionwithkey). signrawtransaction is marked as DEPRECATED and will call the right signrawtransaction* command as per the parameters in order to maintain compatibility. Updated signrawtransactions test to use new RPCs
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Merge #11178: Add iswitness parameter to decode- and fundrawtransaction RPCsWladimir J. van der Laan2017-12-191-1/+3
|\ | | | | | | | | | | | | | | | | | | | | 6f39ac0 Add test for decoderawtransaction bool (MeshCollider) bbdbe80 Add iswitness parameter to decode- and fundrawtransaction RPCs (MeshCollider) Pull request description: Suggested in https://github.com/bitcoin/bitcoin/pull/10481#issuecomment-325244946, this adds the option to explicitly choose whether a serialized transaction should be decoded as a witness or non-witness transaction rather than relying on the heuristic checks in #10481. The parameter defaults to relying on #10481 if not included, but it overrides that if included. Tree-SHA512: d4846a5bb7d64dc19c516445488b00af329fc1f4181d9dfdf9f2382a086568edc98250a4ac7594e24a1bc231dfdee53c699b12c8380c355b920a67cc6770b7a9
| * Add iswitness parameter to decode- and fundrawtransaction RPCsMeshCollider2017-09-061-1/+3
| |
* | scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-6/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* rpc: Move ValueFromAmount to core_writeWladimir J. van der Laan2017-08-071-0/+1
| | | | | | | | | | This is necessary because core_write has to write amounts in TxToUniv, and mistakingly uses FormatMoney for that (which is only for debugging). We don't move AmountFromValue at the same time, as this is more challenging due to the RPCError depencency there.
* Use list initialization (C++11) for maps/vectors instead of ↵practicalswift2017-06-061-5/+4
| | | | boost::assign::map_list_of/list_of
* [trivial] Fix typos in commentspracticalswift2017-03-211-1/+1
|
* Merge #9281: Refactor: Remove using namespace <xxx> from bench/ & test/ sourcesMarcoFalke2017-01-051-70/+68
|\ | | | | | | 73f4119 Refactoring: Removed using namespace <xxx> from bench/ and test/ source files. (Karl-Johan Alm)
| * Refactoring: Removed using namespace <xxx> from bench/ and test/ source files.Karl-Johan Alm2017-01-021-70/+68
| |
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Merge #8996: Network activity toggleJonas Schnelli2016-11-111-0/+22
|\ | | | | | | | | | | | | | | | | 19f46f1 Qt: New network_disabled icon (Luke Dashjr) 54cf997 RPC/Net: Use boolean consistently for networkactive, and remove from getinfo (Luke Dashjr) b2b33d9 Overhaul network activity toggle (Jonas Schnelli) 32efa79 Qt: Add GUI feedback and control of network activity state. (Jon Lund Steffensen) e38993b RPC: Add "togglenetwork" method to toggle network activity temporarily (Jon Lund Steffensen) 7c9a98a Allow network activity to be temporarily suspended. (Jon Lund Steffensen)
| * RPC/Net: Use boolean consistently for networkactive, and remove from getinfoLuke Dashjr2016-10-241-6/+6
| |
| * Overhaul network activity toggleJonas Schnelli2016-10-241-0/+22
| | | | | | | | | | | | - Rename RPC command "togglenetwork" to "setnetworkactive (true|false)" - Add simple test case - GUI toggle added to connections icon in statusbar
* | [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-2/+5
|/
* [test] Remove unused codeMarcoFalke2016-08-241-12/+0
|
* RPC: fix generatetoaddress failing to parse address and add unit testmruddy2016-04-031-0/+24
|
* rpc: Register calls where they are definedWladimir J. van der Laan2016-03-311-1/+1
| | | | | | | | | | | | Split out methods to every module, apart from 'help' and 'stop' which are implemented in rpcserver.cpp itself. - This makes it easier to add or remove RPC commands - no longer everything that includes rpcserver.h has to be rebuilt when there's a change there. - Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions. - Removes most of the bitcoin-specific code from rpcserver.cpp and .h. Continues #7307 for the non-wallet.
* move rpc* to rpc/Daniel Cousens2016-01-211-3/+3
|
* Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ | | | | | | | | | | fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
* | Double semicolon cleanup.21E142015-12-301-2/+2
|/
* [RPC] Add transaction size to JSON outputNick2015-11-281-0/+1
| | | | This may be useful for blockchain explorers.
* [Univalue] add univalue over subtreeJonas Schnelli2015-10-011-1/+1
| | | | similar to secp256k1 include and compile univalue over a subtree
* net: use CIDR notation in CSubNet::ToString()Jonas Schnelli2015-09-161-7/+7
|
* Remove rpc_boostasiotocnetaddr testWladimir J. van der Laan2015-09-021-15/+0
| | | | Dropping all use of boost::asio.
* Add OP_RETURN support in createrawtransaction RPC call, add tests.Pavel Janík2015-08-061-0/+18
|