aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.h
AgeCommit message (Collapse)Author
2013-11-27Split up bitcoinrpc (code movement only)Wladimir J. van der Laan
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.
2013-11-13Issue #1865 - Clean up RPC help messagessje
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
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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.
2013-10-24RPC: error code changes and prevent crash with walletpassphrasePhilip Kaufmann
- 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
2013-10-20Merge pull request #3119Pieter Wuille
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20Bump Year Number to 2013super3
2013-10-14Add network traffic graphScott Ellis
2013-10-04Added ping time measurement.Josh Lehan
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.
2013-10-01Support absence of wallet (pwalletMain==NULL) in several locations,Jeff Garzik
notably RPC.
2013-10-01Merge pull request #2888 from litecoin-project/getnetworkhashpsJeff Garzik
Add getnetworkhashps to get the estimated network hashrate
2013-09-17Add getnetworkhashps to get the calculated network hashratecoblee
2013-09-12Add RPC call decodescriptPeter Todd
2013-09-12Move Parse{Hash|Hex} to be usable by all RPC codePeter Todd
2013-08-28RPC: add getrawchangeaddress, for raw transaction change destinationsJeff Garzik
2013-07-03RPC: add getbestblockhash, to return tip of best chainJeff Garzik
2013-06-23Merge pull request #2592 from sipa/dumpwalletPieter Wuille
Add dumpwallet and importwallet RPC commands
2013-06-22Add dumpwallet and importwallet RPCsPieter Wuille
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
2013-06-19RPC: add 'verifychain', to verify chain database at runtimeJeff Garzik
2013-05-30Merge pull request #2716 from laanwj/2013_05_30_getworkJeff Garzik
Move pMiningKey init out of StartRPCThreads
2013-05-30Merge pull request #2625 from gavinandresen/walletlock_asioJeff Garzik
Use boost::asio::deadline_timer for walletpassphrase timeout
2013-05-30Move pMiningKey init out of StartRPCThreadsWladimir J. van der Laan
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.
2013-05-23Clean up mining CReserveKey to prevent crash at shutdownGavin Andresen
Fixes issue#2687
2013-05-07Use boost::asio::deadline_timer for walletpassphrase timeoutGavin Andresen
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
2013-04-03Port Thread* methods to boost::thread_groupGavin Andresen
2013-03-07CRPCCommand.unlocked -> CRPCCommand.threadSafefreewil
unlocked could be confused with wallet encryption
2013-01-27Add a getaddednodeinfo RPC.Matt Corallo
2013-01-27Add addnode RPC command.Matt Corallo
2012-11-15Add new RPC "lockunspent", to prevent spending of selected outputsJeff Garzik
and associated RPC "listlockunspent". This is a memory-only filter, which is empty when a node restarts.
2012-10-29New createmultisig rpc commandGavin Andresen
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.
2012-10-20Add gettxout and gettxoutsetinfo RPCsPieter Wuille
2012-10-04Add constants for HTTP status codesWladimir J. van der Laan
2012-10-04Document RPC error codesWladimir J. van der Laan
Replace all "magic values" in RPCError(...) by constants.
2012-08-23Add address groupings RPC from the coincontrol patches.coderrr
Signed-off-by: Gregory Maxwell <greg@xiph.org>
2012-08-21Merge pull request #1493 from jgarzik/unlocked-rpcJeff Garzik
RPC: add facility to enable RPCs to run outside cs_main, wallet locks
2012-08-21RPC: add facility to enable RPCs to run outside cs_main, wallet locksJeff Garzik
Use with 'stop' and 'help' RPCs. This provides a facility to individually evaluate the locking for an RPC, and potentially make it more parallel.
2012-08-21Fix 32-bit build error: include util.h to get int64 typedefGavin Andresen
2012-08-21Merge pull request #1693 from jgarzik/rpcwalletJeff Garzik
Move code to new modules rpcwallet.cpp, rpcblockchain.cpp
2012-08-21RPC, cosmetic: move more RPC code to new rpcblockchain.cpp moduleJeff Garzik
2012-08-21RPC, cosmetic: move wallet-related RPCs to new rpcwallet.cpp moduleJeff Garzik
2012-08-20Allow signrawtransaction '...' null null 'hashtype'Gavin Andresen
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.
2012-07-05RPCTypeCheck method to make type-checking JSON Arrays easier.Gavin Andresen
2012-05-23rpcdump: include cleanup. move JSONRPCError def to bitcoinrpc.h.Jeff Garzik
2012-05-21Define BOOST_SPIRIT_THREADSAFE in all makefilesJeff Garzik
rather than at each include site. Fixes #1371
2012-05-18Update License in File HeadersFordy
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.
2012-05-08Support multi-threaded JSON-RPCDavid Joel Schwartz
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]
2012-05-05Add UI RPC console / debug windowWladimir J. van der Laan
2012-04-21Expose CRPCTable via bitcoinrpc.h for testingPieter Wuille
2012-02-07Update all copyrights to 2012Gavin Andresen
2011-08-16Merge branch 'master' of https://github.com/bitcoin/bitcoinWladimir J. van der Laan
2011-07-03windows build fixesWladimir J. van der Laan