aboutsummaryrefslogtreecommitdiff
path: root/src/rpcserver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* New issue Don't reveal whether password is <20 or >20 characters in RPCWhit J2014-08-291-3/+2
| | | | | | | From Bitcoin Pull #4728 It seems bad to base a decision to delay on the password length, as it leaks a tiny bit of information. This doesn't change DoS potential as it is trivial to hold up all RPC threads in another way for someone in the rpcallowip list.
* Enable RPC commands for mining aux proof of work blocks.Nell Hardcastle2014-08-011-0/+3
|
* rpc: Add acceptors only when listening succeededWladimir J. van der Laan2014-07-091-2/+2
| | | | | Rebased-From: 6afa493 Rebased-By: Wladimir J. van der Laan <[email protected]>
* rpc: Ignore and log errors during cancelWladimir J. van der Laan2014-07-091-2/+11
| | | | | | | | | | Cancelling the RPC acceptors can sometimes result in an error about a bad file descriptor. As this is the shutdown sequence we need to continue nevertheless, ignore these errors, log a warning and proceed. Fixes #4352.
* rpc: keep track of acceptors, and cancel them in StopRPCThreadsWladimir J. van der Laan2014-06-291-0/+1
| | | | | | | | | | 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.
* rpc: keep track of acceptorsWladimir J. van der Laan2014-06-291-3/+13
|
* rpc: Make sure conn object is always cleaned upWladimir J. van der Laan2014-06-291-10/+6
| | | | | | | | | | | | | 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).
* rpc: pass errors from async_acceptWladimir J. van der Laan2014-06-291-1/+3
| | | | | | | | | | | | | 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.
* Add tests for BoostAsioToCNetAddrWladimir J. van der Laan2014-06-291-2/+1
|
* rpc: Use netmasks instead of wildcards for IP address matchingWladimir J. van der Laan2014-06-291-14/+49
| | | | | | | | | | | | `-rpcallowip` currently has a wacky wildcard-based format. After this commit it will accept the more standard format, for example: - Ranges with netmask 127.0.0.0/255.255.255.0, ::/0 - Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112 - Loose IPs ::1, 127.0.0.1 Trying to use the old *?-based format will result in an error message at launch.
* rpc: add `getblockchaininfo` and `getnetworkinfo`Wladimir J. van der Laan2014-06-291-0/+2
| | | | | | | | | | | | | 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)
* Organize RPCCommands tableWladimir J. van der Laan2014-05-261-47/+57
|
* Fix regression testsGavin Andresen2014-05-251-1/+1
| | | | | | | 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.
* Updated port numbers to reflect Dogecoin ports.Ross Nicoll2014-03-281-1/+1
|
* Replaced occurrences of "bitcoin" with "dogecoin" or "Dogecoin" as appropriateRoss Nicoll2014-03-281-3/+3
| | | | (specific, use of "Dogecoin" as a noun are now capitalised).
* Replaced references to Bitcoin with Dogecoin/Dogecoin Core as appropriate.Ross Nicoll2014-03-281-3/+3
|
* credit where credit is dueJannis Froese2014-03-221-0/+1
| | | | (cherry picked from commit 5cdcfa9a2b445dd8f8009f6ff3a8ded4ee6515e6)
* Protocol changes for Dogecoin 1.5Jannis Froese2014-03-221-1/+1
| | | | | | ported over from Dogecoin and Litecoin (cherry picked from commit 8b09dad2d506fc5a6239863b1c0e33bf7e84da00)
* Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | 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.
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-10/+10
| | | | | | | 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.
* qt: allow `walletpassphrase` in debug console without -serverWladimir J. van der Laan2014-01-171-0/+15
| | | | | | | | | | | | | | 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.
* small headers ordering cleanupPhilip Kaufmann2014-01-111-1/+1
| | | | | | - keep headers in alphabetical order - fix Makefile.am (2 files in 1 line - leftover) - remove some spaces etc.
* Merge pull request #3369Wladimir J. van der Laan2013-12-201-0/+1
|\ | | | | | | 6027b46 Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balance (Michael Bauer)
| * Add rpc command 'getunconfirmedbalance' to obtain total unconfirmed balanceMichael Bauer2013-12-081-0/+1
| | | | | | | | | | Conflicts: src/rpcserver.cpp
* | Move `verifymessage` from rpcwallet to rpcmiscWladimir J. van der Laan2013-12-131-1/+1
| | | | | | | | Enables it in --disable-wallet compiles.
* | Move `createmultisig` from rpcwallet to rpcmiscWladimir J. van der Laan2013-12-131-1/+1
| | | | | | | | Enables it in --disable-wallet compiles.
* | Move `validateaddress` from rpcwallet to rpcmiscWladimir J. van der Laan2013-12-131-1/+1
| | | | | | | | | | Enables it in --disable-wallet compiles. Delimit wallet-using part using #ifdef ENABLE_WALLET.
* | Move `settxfee` from rpcblockchain to rpcwalletWladimir J. van der Laan2013-12-131-1/+1
| | | | | | | | `settxfee` only affects the wallet, not the block chain.
* | Allow mining RPCs with --disable-walletWladimir J. van der Laan2013-12-091-7/+12
| | | | | | | | | | | | | | | | | | | | | | The following mining-related RPC calls don't use the wallet: - getnetworkhashps - getmininginfo - getblocktemplate - submitblock Enable them when compiling with --disable-wallet.
* | Delimit code with #ifdef ENABLE_WALLETWladimir J. van der Laan2013-12-041-14/+31
| | | | | | | | | | Delimit all code that uses the wallet functions in implementation files that conditionally use the wallet.
* | Move HelpExample* from rpcwallet to rpcserverWladimir J. van der Laan2013-12-041-0/+9
|/ | | | | General functions used throughout the RPC framework don't belong in rpcwallet.
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-0/+823
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.