aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [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.
* Add test for monetary value parsingWladimir J. van der Laan2013-10-231-6/+27
| | | | | | Just-in-case sanity test for JSON spirit and AmountFromValue. Also update rpc_format_monetary_values test to use ValueFromAmount, so that ValueFromAmount is also tested.
* Add test for monetary value formattingWladimir J. van der Laan2013-10-231-0/+10
| | | | | Tests for issue #3126. This problem pops up after upgrading json-spirit.
* Updated help and tests for getreceivedby(account|address)Andrey2012-12-161-7/+28
|
* Add redeemScript to listunspent output and signrawtransaction inputGavin Andresen2012-10-291-0/+20
| | | | | | | signrawtransaction was unable to sign pay-to-script-hash inputs when given the list of private keys to use. With this commit you can provide the p2sh redemption script in the list of inputs.
* Tests for raw transactions argument checkingGavin Andresen2012-10-291-1/+69
|
* No need for test fixture now that multisig is enabled on main network.Gavin Andresen2012-10-291-8/+1
|
* Wrong address added to collection in testxanatos2012-09-071-1/+1
| | | The wrong address is added to the collection. As was written a second copy of address1 was added (and so address2 was useless).
* Small fix to rpc_testsxanatos2012-06-221-3/+3
|
* Expose CRPCTable via bitcoinrpc.h for testingPieter Wuille2012-04-211-7/+2
|
* Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen2012-01-131-0/+74