aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
AgeCommit message (Collapse)Author
2012-08-21RPC: split new 'submitblock' out of 'getblocktemplate'Jeff 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-08-03Merge branch 'gmp_bip_0.6.0' into gmp_bipLuke Dashjr
Conflicts: src/bitcoinrpc.cpp
2012-08-03Minimal BIP 22 (getblocktemplate) supportLuke Dashjr
- Replaces getmemorypool with new getblocktemplate - Add missing keys: coinbaseaux, target, mutable, noncerange, sigoplimit, sizelimit, and height - Accept and send parameter Objects, checking "mode" key if present - Return rejection reason "rejected" for submit mode
2012-08-01Merge pull request #1612 from luke-jr/opti_getblkhashGregory Maxwell
Optimize JSON-RPC getblockhash
2012-08-01Optimize JSON-RPC getblockhashLuke Dashjr
- If the height is in the first half, start at the genesis block and go up, rather than at the top - Cache the last lookup and use it as a reference point if it's close to the next request, to make linear lookups always fast
2012-08-01Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-07-26Merge branch 'bugfix_CNBerr' of git://github.com/luke-jr/bitcoinGavin Andresen
2012-07-17Give a better error message than 'type mismatch' for complex JSON argumentsGavin Andresen
2012-07-17Fix thread names after reviewGiel van Schijndel
* Fix wrong thread name for wallet *relocking* thread - Was named the unlocking thread * Use consistent naming Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-17Give threads a recognisable name to aid in debuggingGiel van Schijndel
NOTE: These thread names are visible in gdb when using 'info threads'. Additionally both 'top' and 'ps' show these names *unless* told to display the command-line instead of task name. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-07-05bitcoinrpc.cpp: Removed outdated commentJeff Garzik
Fixes #1373
2012-07-05Use unsigned ints to fix signed/unsigned warningsGavin Andresen
2012-07-05Implement raw transaction RPC callsGavin Andresen
Implement listunspent / getrawtransaction / createrawtransaction / signrawtransaction, to support creation and signing-on-multiple-device multisignature transactions.
2012-07-05RPCTypeCheck method to make type-checking JSON Arrays easier.Gavin Andresen
2012-07-05Rework gettransaction / getblock RPC callsGavin Andresen
This PULL reworks new (post-0.6.*) features of the gettransaction/getblock RPC calls as follows: It removes the 'decompositions' object argument from getblock, replacing it just a list of transaction hashes; equivalent (I believe) of passing the {"tx":"hash"} decomposition. It replaces the 'decompositions' object argument of gettransaction with a boolean flag; if true, returns the same stuff that the {"script":"obj"} decomposition would return (txins/txouts as hex, disassembled, and bitcoin addresses). It adds a "rawtx" field to the output of gettransaction, that is the entire transaction serialized and hex-encoded. It removes the "size" field from gettransaction, since the size is trivial to compute from the "rawtx" field (either take the length after hex-decoding, or just compute it as hex-length/2).
2012-07-03RPC: add support for JSON-RPC 2.0-style request batchingJeff Garzik
If the top-level object is an array, it is assumed to be an array of JSON-RPC requests. An array is returned, containing one response (error or not) per request, in the order submitted. In a slight change in semantics, batched requests -always- return an HTTP 200 OK status, even ones full of invalid or incorrect requests.
2012-07-03RPC: break out high level JSON-RPC req/resp into their own functionsJeff Garzik
This prepares for JSON-RPC 2.0 batches.
2012-06-29RPC: add 'getpeerinfo', returning easy-to-retrieve per-CNode dataJeff Garzik
2012-06-28Create new rpcnet module, and move 'getconnectioncount' RPC to itJeff Garzik
2012-06-28Fix build error.Matt Corallo
2012-06-28Lock vnThreadsRunning[THREAD_RPCHANDLER].Matt Corallo
2012-06-28Use a rpc-specific queue to tell asio connections to shutdown.Matt Corallo
2012-06-28Revert "*Always* send a shutdown signal to enable custom shutdown actions"Matt Corallo
This reverts commit 896899e0d66e25f6549a92749d237c8a87b12f08.
2012-06-24Cancel outstanding listen ops for RPC when shutting downGiel van Schijndel
Use Boost's signal2 slot tracking mechanism to cancel any (still open) listening sockets when receiving a shutdown signal. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-06-24Merge branch 'master' into async-ipv6-rpcGiel van Schijndel
2012-06-22RPC: add 'getrawmempool', listing all transaction ids in memory poolJeff Garzik
2012-06-17*Always* send a shutdown signal to enable custom shutdown actionsGiel van Schijndel
NOTE: This is required to be sure that we can properly shut down the RPC thread. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-06-17Merge branch 'master' into async-ipv6-rpcGiel van Schijndel
Conflicts: src/bitcoinrpc.cpp Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-06-12introduce a new StartShutdown() function, which starts a thread with ↵Philip Kaufmann
Shutdown() if no GUI is used and calls uiInterface.QueueShutdown() if a GUI is used / all direct uiInterface.QueueShutdown() calls are replaced with Shutdown() - this ensures a clean GUI shutdown, even when catching a SIGTERM and allows the BitcoinGUI destructor to get called (which fixes a tray-icon issue and keeps the tray-icon until Bitcoin-Qt exits)
2012-06-04Merge branch 'netopt' of https://github.com/sipa/bitcoinGavin Andresen
2012-05-31Use ConvertTo to simplify sendmany/addmultisigaddress argument handlingGavin Andresen
2012-05-31Make sendrawtx return txid to be consistent with other send methods.Gavin Andresen
2012-05-31Rework network config settingsPieter Wuille
2012-05-25Use the QueueShutdown signal to stop accepting new RPC connectionsGiel van Schijndel
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-25Allow all addresses on the loopback subnet (127.0.0.0/8) not just 127.0.0.1Giel van Schijndel
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-25Generalise RPC connection handling code to allow more listening socketsGiel van Schijndel
Using this modification it should be relatively easy to, at a later time, listen on multiple addresses (even Unix domain sockets should be possible). Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-25Allow clients on the IPv6 loopback as wellGiel van Schijndel
Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-25Add dual IPv4/IPv6 stack support to the RPC serverGiel van Schijndel
The RPC server now listens for, and handles, incoming connections on both IPv4 as well as IPv6. If available (and usable) it uses a dual IPv4/IPv6 socket on systems that support it (e.g. Linux and BSDs) and falls back to separate IPv4/IPv6 sockets on systems that don't (e.g. Windows). Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-25Use asynchronous I/O to handle RPC requestsGiel van Schijndel
This allows more flexibility in the RPC code, e.g. making it easier to handle multiple simultaneous connections later on. Currently asynchronous I/O is only used to listen for and accept incoming connections. Asynchronous reading/writing is more involved. Signed-off-by: Giel van Schijndel <me@mortis.eu>
2012-05-24Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille
This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.
2012-05-24Encapsulate public keys in CPubKeyPieter Wuille
2012-05-23JSON-RPC: Add 'sendrawtx' op, for sending pre-built TX's to networkJeff Garzik
2012-05-20Merge pull request #1354 from fanquake/masterPieter Wuille
Update Header Licenses
2012-05-20Make testcases build, prevent windows symbol collisionWladimir J. van der Laan
2012-05-20Convert UI interface to boost::signals2.Wladimir J. van der Laan
- Signals now go directly from the core to WalletModel/ClientModel. - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet. - Gets rid of noui.cpp, the few lines that were left are merged into init.cpp - Rename wxXXX message flags to MF_XXX, to make them UI indifferent. - ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
2012-05-19Merge pull request #1358 from luke-jr/shared_lockchkPieter Wuille
Shared code for wallet lock help and check
2012-05-18Shared code for wallet lock help and checkLuke Dashjr
2012-05-18change strings to Bitcoin (uppercase), where it is used as a noun and update ↵Philip Kaufmann
strings to use "Qt" (and not qt or QT) / update initialisation of notificator to use qApp->applicationName() instead of a static string
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.