aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.h
Commit message (Collapse)AuthorAgeFilesLines
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-236/+0
| | | | | | | | | | | | | | 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.
* Issue #1865 - Clean up RPC help messagessje2013-11-131-0/+3
| | | | | | | | | | | | | | | | | | | Based on the proposal, update the help message of rpc methods - strings arguments are in double quotes rather than square brackets - numeric arguments have no quotes (and no default value) - optional parameters are surrounded by round brackets - json arguments are strings but don't use double quotes Added 3 sections for the details - Arguments: lists each argument, it's type, required or not, a default, and a description - Result: The method result, with json format if applicable, type, and a description - Examples: examples calls using bitcoin-cli and curl for json rpc call Problems - maybe this is too verbose - lines might be too long - description are not good or complete - examples may be too much
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-10/+11
| | | | | | | | | 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.
* RPC: error code changes and prevent crash with walletpassphrasePhilip Kaufmann2013-10-241-0/+3
| | | | | | | | | | - fix crash with walletpassphrase by checking if RPC server is running and give a friendly error message how to fix this (fixes #3100) - add 3 new RPCErrorCodes RPC_SERVER_NOT_STARTED, RPC_NODE_ALREADY_ADDED and RCP_NODE_NOT_ADDED (I checked the source to not use a number already in use for RPC_SERVER_NOT_STARTED) - use the new codes where needed / missing - add missing use of RPC_INVALID_PARAMETER
* Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | Add network traffic graphScott Ellis2013-10-141-0/+1
| |
* | Added ping time measurement.Josh Lehan2013-10-041-0/+1
|/ | | | | | | New RPC "ping" command to request ping. Implemented "pong" message handler. New "pingtime" field in getpeerinfo, to provide results to user. New "pingwait" field, to show pings still in flight, to better see newly lagging peers.
* Support absence of wallet (pwalletMain==NULL) in several locations,Jeff Garzik2013-10-011-0/+1
| | | | notably RPC.
* Merge pull request #2888 from litecoin-project/getnetworkhashpsJeff Garzik2013-10-011-0/+1
|\ | | | | Add getnetworkhashps to get the estimated network hashrate
| * Add getnetworkhashps to get the calculated network hashratecoblee2013-09-171-0/+1
| |
* | Add RPC call decodescriptPeter Todd2013-09-121-0/+1
| |
* | Move Parse{Hash|Hex} to be usable by all RPC codePeter Todd2013-09-121-0/+9
| |
* | RPC: add getrawchangeaddress, for raw transaction change destinationsJeff Garzik2013-08-281-0/+1
|/
* RPC: add getbestblockhash, to return tip of best chainJeff Garzik2013-07-031-0/+1
|
* Merge pull request #2592 from sipa/dumpwalletPieter Wuille2013-06-231-0/+3
|\ | | | | Add dumpwallet and importwallet RPC commands
| * Add dumpwallet and importwallet RPCsPieter Wuille2013-06-221-0/+3
| | | | | | | | | | | | | | dumpwallet: produce a dump of all keys in a wallet, in a format compatible with Bitcoin Wallet for Android and Multibit. importwallet: import such a dump
* | RPC: add 'verifychain', to verify chain database at runtimeJeff Garzik2013-06-191-0/+1
|/
* Merge pull request #2716 from laanwj/2013_05_30_getworkJeff Garzik2013-05-301-1/+3
|\ | | | | Move pMiningKey init out of StartRPCThreads
| * Move pMiningKey init out of StartRPCThreadsWladimir J. van der Laan2013-05-301-1/+3
| | | | | | | | | | | | | | | | | | | | This commit decouples the pMiningKey initialization and shutdown from the RPC threads. `getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran from the debug window in the UI even when the RPC server is not running. Solves issue #2706.
* | Merge pull request #2625 from gavinandresen/walletlock_asioJeff Garzik2013-05-301-0/+6
|\ \ | |/ |/| Use boost::asio::deadline_timer for walletpassphrase timeout
| * Use boost::asio::deadline_timer for walletpassphrase timeoutGavin Andresen2013-05-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New method in bitcoinrpc: RunLater, that uses a map of deadline timers to run a function later. Behavior of walletpassphrase is changed; before, calling walletpassphrase again before the lock timeout passed would result in: Error: Wallet is already unlocked. You would have to call lockwallet before walletpassphrase. Now: the last walletpassphrase with correct password wins, and overrides any previous timeout. Fixes issue# 1961 which was caused by spawning too many threads. Test plan: Start with encrypted wallet, password 'foo' NOTE: python -c 'import time; print("%d"%time.time())' ... will tell you current unix timestamp. Try: walletpassphrase foo 600 getinfo EXPECT: unlocked_until is about 10 minutes in the future walletpassphrase foo 1 sleep 2 sendtoaddress mun74Bvba3B1PF2YkrF4NsgcJwHXXh12LF 11 EXPECT: Error: Please enter the wallet passphrase with walletpassphrase first. walletpassphrase foo 600 walletpassphrase foo 0 getinfo EXPECT: wallet is locked (unlocked_until is 0) walletpassphrase foo 10 walletpassphrase foo 600 getinfo EXPECT: wallet is unlocked until 10 minutes in future walletpassphrase foo 60 walletpassphrase bar 600 EXPECT: Error, incorrect passphrase getinfo EXPECT: wallet still scheduled to lock 60 seconds from first (successful) walletpassphrase
* | Clean up mining CReserveKey to prevent crash at shutdownGavin Andresen2013-05-231-0/+2
|/ | | | Fixes issue#2687
* Port Thread* methods to boost::thread_groupGavin Andresen2013-04-031-1/+2
|
* CRPCCommand.unlocked -> CRPCCommand.threadSafefreewil2013-03-071-1/+1
| | | | unlocked could be confused with wallet encryption
* Add a getaddednodeinfo RPC.Matt Corallo2013-01-271-0/+1
|
* Add addnode RPC command.Matt Corallo2013-01-271-0/+1
|
* Add new RPC "lockunspent", to prevent spending of selected outputsJeff Garzik2012-11-151-0/+2
| | | | | | and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts.
* New createmultisig rpc commandGavin Andresen2012-10-291-0/+1
| | | | | | This is to support the signrawtransaction API call; given the public keys involved in a multisig transaction, this gives back the redeemScript needed to sign it.
* Add gettxout and gettxoutsetinfo RPCsPieter Wuille2012-10-201-0/+2
|
* Add constants for HTTP status codesWladimir J. van der Laan2012-10-041-0/+11
|
* Document RPC error codesWladimir J. van der Laan2012-10-041-0/+36
| | | | Replace all "magic values" in RPCError(...) by constants.
* Add address groupings RPC from the coincontrol patches.coderrr2012-08-231-0/+1
| | | | Signed-off-by: Gregory Maxwell <[email protected]>
* Merge pull request #1493 from jgarzik/unlocked-rpcJeff Garzik2012-08-211-0/+1
|\ | | | | RPC: add facility to enable RPCs to run outside cs_main, wallet locks
| * RPC: add facility to enable RPCs to run outside cs_main, wallet locksJeff Garzik2012-08-211-0/+1
| | | | | | | | | | | | | | Use with 'stop' and 'help' RPCs. This provides a facility to individually evaluate the locking for an RPC, and potentially make it more parallel.
* | Fix 32-bit build error: include util.h to get int64 typedefGavin Andresen2012-08-211-0/+2
|/
* Merge pull request #1693 from jgarzik/rpcwalletJeff Garzik2012-08-211-0/+67
|\ | | | | Move code to new modules rpcwallet.cpp, rpcblockchain.cpp
| * RPC, cosmetic: move more RPC code to new rpcblockchain.cpp moduleJeff Garzik2012-08-211-0/+14
| |
| * RPC, cosmetic: move wallet-related RPCs to new rpcwallet.cpp moduleJeff Garzik2012-08-211-0/+53
| |
* | Allow signrawtransaction '...' null null 'hashtype'Gavin Andresen2012-08-201-2/+2
|/ | | | | | Allows the user to pass null as the second or third parameter to signrawtransaction, in case you need to (for example) fetch private keys from the wallet but want to specify the hash type.
* RPCTypeCheck method to make type-checking JSON Arrays easier.Gavin Andresen2012-07-051-0/+15
|
* rpcdump: include cleanup. move JSONRPCError def to bitcoinrpc.h.Jeff Garzik2012-05-231-0/+2
|
* Define BOOST_SPIRIT_THREADSAFE in all makefilesJeff Garzik2012-05-211-1/+0
| | | | | | rather than at each include site. Fixes #1371
* Update License in File HeadersFordy2012-05-181-1/+1
| | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* Support multi-threaded JSON-RPCDavid Joel Schwartz2012-05-081-0/+1
| | | | | | | | | | | Change internal HTTP JSON-RPC server from single-threaded to thread-per-connection model. The IP filter list is applied prior to starting the thread, which then processes the RPC. A mutex covers the entire RPC operation, because not all RPC operations are thread-safe. [minor modifications by jgarzik, to make change upstream-ready]
* Add UI RPC console / debug windowWladimir J. van der Laan2012-05-051-0/+15
|
* Expose CRPCTable via bitcoinrpc.h for testingPieter Wuille2012-04-211-0/+34
|
* Update all copyrights to 2012Gavin Andresen2012-02-071-1/+1
|
* Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan2011-08-161-0/+1
|
* windows build fixesWladimir J. van der Laan2011-07-031-0/+6