aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add functionality to generate auxpow blocks in regtestMD Islam2021-05-251-0/+6
| | | | | | | | | This roughly reverts the work done here that disabled auxpow generation in regtest: https://github.com/dogecoin/dogecoin/pull/1431/files\#diff-ccc24453c13307f815879738d3bf00eec351417537fbf10dde1468180cacd2f1R127-R137 This is a pretty severe functionality change since auxpow is critical to Dogecoin and wallet integrators need to be able to parse the extra data in auxpow blocks. For future wallet integrators: Dogecoin follows similar schemes as Namecoin for the merged mining support and the spec is here: https://en.bitcoin.it/wiki/Merged_mining_specification pr review: GetHash -> GetPoWHash
* [tests] fix rpc ban test: set test time far into the futurePatrick Lodder2021-01-151-2/+2
|
* Fix 1.14 unit tests (#1408)Max K2018-09-191-0/+1
| | | | | | | | * Fix BlockEncodings test by setting a legacy block version * Fix RPC test by adding missing RPC call * Add missing regtest genesis hashes
* Replace test data with Dogecoin valuesRoss Nicoll2018-09-191-4/+3
| | | | | | | | | | | | | | | | | | | Replace test data with Dogecoin equivalents in the folowing tests: * base58 * bip32 * keys * miner * pow 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.
* 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
|
* json: fail read_string if string contains trailing garbageWladimir J. van der Laan2015-06-031-0/+18
| | | | | | | | | | Change `read_string` to fail when not the entire input has been consumed. This avoids unexpected, even dangerous behavior (fixes #6223). The new JSON parser adapted in #6121 also solves this problem so in master this is a temporary fix, but should be backported to older releases. Also adds tests for the new behavior.
* Reinitialize state in between individual unit tests.Pieter Wuille2015-03-031-1/+3
| | | | | This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
* Merge pull request #5470Wladimir J. van der Laan2014-12-191-1/+1
|\ | | | | | | 78253fc Remove references to X11 licence (Michael Ford)
| * Remove references to X11 licenceMichael Ford2014-12-161-1/+1
| |
* | make all catch() arguments constPhilip Kaufmann2014-12-171-2/+1
|/ | | | | | | - I saw this on http://en.cppreference.com/w/cpp/language/try_catch and thought it would be a good idea - also unify used format to better be able to search for exception uses in our codebase
* rpc_tests: use BOOST_CHECK_EQUALJeff Garzik2014-08-201-16/+16
| | | | | Upon failure, BOOST_CHECK_EQUAL provides additional diagnostic information, displaying that data that failed to match.
* Add tests for BoostAsioToCNetAddrWladimir J. van der Laan2014-05-091-0/+16
|
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+4
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Split off rpc_wallet_testsWladimir J. van der Laan2013-12-041-71/+3
| | | | | Split wallet tests from other RPC tests. Now no #ifdef ENABLE_WALLET are needed anymore in either file.
* Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan2013-12-041-1/+4
| | | | | Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-1/+2
| | | | | | | | | | | | | | Split bitcoinrpc up into - rpcserver: bitcoind RPC server - rpcclient: bitcoin-cli RPC client - rpcprotocol: shared common HTTP/JSON-RPC protocol code One step towards making bitcoin-cli independent from the rest of the code, and thus a smaller executable that doesn't have to be linked against leveldb. This commit only does code movement, there are no functional changes.
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+4
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.