aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace test data with Dogecoin valuesRoss Nicoll2019-04-031-3/+3
| | | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow * wallet Replace RPC and deterministic signatures in unit tests with Dogecoin values. While conventionally I'd use an alternative implementation for these, as RFC 6979 compliant signature generation isn't terribly common, and there's no reason to suspect we've modified this code, I'm going to assert that it's good enough to test that the code doesn't provide different values. Disabled Bitcoin PoW tests, but left code in place to simplify later merges. These are replaced by the Dogecoin PoW tests.
* 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
|
* rpc: Make ValueFromAmount always return 8 decimalsWladimir J. van der Laan2015-07-181-0/+23
| | | | | | | | | | | | | This is the format that was always returned to JSON clients. The difference was not noticed before, because VREAL values are post-processed by univalue. By implementing the functionality directly it breaks the dependency of rpcserver on utilmoneystr. FormatMoney is now only used for debugging purposes. To test, port over the formatting tests from util_tests.cpp to rpc_tests.cpp.
* rpc: Accept scientific notation for monetary amounts in JSONWladimir J. van der Laan2015-07-101-0/+21
| | | | | | | | | | | Add a function `ParseFixedPoint` that parses numbers according to the JSON number specification and returns a 64-bit integer. Then this in `AmountFromValue`, rather than `ParseMoney`. Also add lots of tests (thanks to @jonasschnelli for some of them). Fixes issue #6297.
* use CBanEntry as object container for banned nodesJonas Schnelli2015-07-021-2/+2
| | | | | | | - added a reason enum for a ban - added creation time for a ban Using CBanEntry as container will keep banlist.dat extenable.
* setban: add IPv6 testsJonas Schnelli2015-06-191-0/+27
|
* setban: rewrite to UniValue, allow absolute bantimeJonas Schnelli2015-06-171-5/+20
|
* [RPC] extend setban to allow subnetsJonas Schnelli2015-06-171-4/+36
|
* [QA] add setban/listbanned/clearbanned testsJonas Schnelli2015-06-171-0/+9
|
* Changes necessary now that zero values accepted in AmountFromValueWladimir J. van der Laan2015-06-061-0/+3
| | | | | | | | | - Add an accept test for zero amounts, and a reject test for negative amounts - Remove ugly hack in `settxfee` that is no longer necessary - Do explicit zero checks in wallet RPC functions - Don't add a check for zero amounts in `createrawtransaction` - this could be seen as a feature
* Simplify RPCclient, adapt json_parse_error testWladimir J. van der Laan2015-06-041-13/+10
| | | | | # Conflicts: # src/test/rpc_tests.cpp
* fix univalue json parse testsJonas Schnelli2015-06-041-9/+12
|
* Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli2015-06-041-8/+9
| | | | | | - implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
* remove JSON Spirit UniValue wrapperJonas Schnelli2015-06-041-1/+1
|
* fix rpc unit test, plain numbers are not JSON compatible objectJonas Schnelli2015-06-041-2/+2
| | | | UniValues read() does only read valid json.
* expicit set UniValue type to avoid empty valuesJonas Schnelli2015-06-041-2/+2
|
* Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik2015-06-041-9/+9
|