aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
AgeCommit message (Collapse)Author
2014-05-12rpc: keep track of acceptors, and cancel them in StopRPCThreadsWladimir J. van der Laan
Fixes #4156. The problem is that the boost::asio::io_service destructor waits for the acceptors to finish (on windows, and boost 1.55). Fix this by keeping track of the acceptors and cancelling them before stopping the event loops. Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com> Rebased-From: cef4494
2014-05-12rpc: Make sure conn object is always cleaned upWladimir J. van der Laan
Make sure conn object always gets cleaned up by using a `boost::shared_ptr`. This makes valgrind happy - before this commit, one connection object always leaked at shutdown, as well as can avoid other leaks, when for example an exception happens. Also add an explicit Close() to the !ClientAllowed path to make it similar to the normal path (I'm not sure whether it is needed, but it can't hurt). Rebased-By: Wladimir J. van der Laan Rebased-From: 1a44522
2014-05-12rpc: pass errors from async_acceptWladimir J. van der Laan
According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html), the function signature of the handler must be: void handler( const boost::system::error_code& error // Result of operation. ); We were binding *all* the arguments, instead of all but the error, resulting in nullary function that never got the error. Fix this by adding an input argument substitution. Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com> Rebased-From: 0a0cd34
2014-05-06rpc: add `getblockchaininfo` and `getnetworkinfo`Wladimir J. van der Laan
Adds two new info query commands that take over information from hodge-podge `getinfo`. Also some new information is added: - `getblockchaininfo` - `chain`: (string) current chain (main, testnet3, regtest) - `verificationprogress: (numeric) estimated verification progress - `chainwork` - `getnetworkinfo` - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
2014-03-31Organize RPCCommands tableWladimir J. van der Laan
Use sensible categories (overall control, P2P, blockchain/UTXO and mining, wallet, wallet-enabled mining) and sort within each. Also remove unnecessary #ifdef ENABLE_WALLET from `rpcnet.cpp`. Functionality-neutral change.
2014-03-24Fix regression testsGavin Andresen
Taught bitcoind to close the HTTP connection after it gets a 'stop' command, to make it easier for the regression tests to cleanly stop. Move bitcoinrpc files to correct location. Tidied up the python-based regression tests.
2014-03-10Merge pull request #3717 from djpnewton/wallet-txcountJeff Garzik
add getwalletinfo RPC call with wallet transaction count
2014-03-07Remove unused includes of boost lexical_castWladimir J. van der Laan
We don't use lexical_cast anywhere, no need to include it.
2014-02-27move wallet info stuff to "getwalletinfo" rpc (left original walletDaniel Newton
stuff in getinfo call for backwards compatibility) add wallet transaction count to getwalletinfo rpc call
2014-02-09Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron
in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
2014-01-23Remove redundant .c_str()sWladimir J. van der Laan
After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
2014-01-17qt: allow `walletpassphrase` in debug console without -serverWladimir J. van der Laan
Currently it is only possible to use `walletpassphrase` to unlock the wallet when bitcoin is started in server mode. Almost everything that manipulates the wallet in the RPC console needs the wallet to be unlocked and is thus unusable without -server. This is pretty unintuitive to me, and I'm sure it's even more confusing to users. Solve this with a very minimal change: by making the GUI start a dummy RPC thread just to handle timeouts.
2014-01-11small headers ordering cleanupPhilip Kaufmann
- keep headers in alphabetical order - fix Makefile.am (2 files in 1 line - leftover) - remove some spaces etc.
2013-12-20Merge pull request #3369Wladimir J. van der Laan
6027b46 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
2013-12-13Move `verifymessage` from rpcwallet to rpcmiscWladimir J. van der Laan
Enables it in --disable-wallet compiles.
2013-12-13Move `createmultisig` from rpcwallet to rpcmiscWladimir J. van der Laan
Enables it in --disable-wallet compiles.
2013-12-13Move `validateaddress` from rpcwallet to rpcmiscWladimir J. van der Laan
Enables it in --disable-wallet compiles. Delimit wallet-using part using #ifdef ENABLE_WALLET.
2013-12-13Move `settxfee` from rpcblockchain to rpcwalletWladimir J. van der Laan
`settxfee` only affects the wallet, not the block chain.
2013-12-09Allow mining RPCs with --disable-walletWladimir J. van der Laan
The following mining-related RPC calls don't use the wallet: - getnetworkhashps - getmininginfo - getblocktemplate - submitblock Enable them when compiling with --disable-wallet.
2013-12-08Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balanceMichael Bauer
Conflicts: src/rpcserver.cpp
2013-12-04Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan
Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
2013-12-04Move HelpExample* from rpcwallet to rpcserverWladimir J. van der Laan
General functions used throughout the RPC framework don't belong in rpcwallet.
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.