Commit graph

30 commits

Author SHA1 Message Date
Nell Hardcastle 5da72d7da8 Enable RPC commands for mining aux proof of work blocks. 2014-08-01 16:43:05 +02:00
Kamil Domanski 2f69f6c80d switch from boost int types to <stdint.h>
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 4b61a6a, 3e74ac2, d56e30c
Github-Pull: #4129
2014-07-09 17:02:13 +02:00
Wladimir J. van der Laan de74b47737 rpc: add getblockchaininfo and getnetworkinfo
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-06-29 15:38:33 +02:00
Ross Nicoll 48c6ec9af0 Replaced occurrences of "bitcoin" with "dogecoin" or "Dogecoin" as appropriate
(specific, use of "Dogecoin" as a noun are now capitalised).
2014-03-28 23:40:56 +00:00
Jannis Froese 9cae5ebbaf change currency three-letter-code to DOGE
also change length of currency amounts in UI

(cherry picked from commit inutoshi/inutoshi@8dcef8791a)
2014-03-24 06:02:40 +01:00
Philip Kaufmann 6943cb9b4f small changes to rpc command help message strings 2014-01-30 14:13:30 +01:00
Wladimir J. van der Laan a943bde6f0 Move settxfee from rpcblockchain to rpcwallet
`settxfee` only affects the wallet, not the block chain.
2013-12-13 16:06:32 +01:00
Gavin Andresen 4d707d5120 Add verbose boolean to getrawmempool
Also changes mempool to store CTxMemPoolEntries
to keep track of when they enter/exit the pool.
2013-11-30 15:42:10 +10:00
Wladimir J. van der Laan fb78cc2378 Split up bitcoinrpc (code movement only)
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-27 06:00:29 +01:00
sje a6099ef319 Issue #1865 - Clean up RPC help messages
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-13 14:54:29 +01:00
Pieter Wuille 84674082b0 Make CCoinsView use block hashes instead of indices 2013-11-10 19:22:53 +01:00
Brandon Dahler 51ed9ec971 Cleanup code using forward declarations.
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-11-10 09:36:28 -06:00
Pieter Wuille 9b1200c23b
Merge pull request #3119
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20 22:25:44 +02:00
super3 db0e8ccd90 Bump Year Number to 2013 2013-10-20 15:25:06 -04:00
Pieter Wuille 4c6d41b8b6 Refactor/encapsulate chain globals into a CChain class 2013-10-11 23:25:50 +02:00
Peter Todd be066fad7d Add RPC call decodescript 2013-09-12 22:53:54 -04:00
Gregory Maxwell a22eed6a1e Make settxfee clear that units are btc/kb. 2013-09-05 17:56:13 -07:00
Peter Todd 1b3656d50b Add 'chainwork' to getblock
Returns nChainWork from the block index, the total work done by all
blocks since the genesis block.
2013-07-24 01:58:23 -04:00
Jeff Garzik 091aa8dae9 RPC: add getbestblockhash, to return tip of best chain 2013-07-03 11:02:29 -04:00
Eric Lombrozo 7db120d531 Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in main.h 2013-06-23 19:59:34 -07:00
Jeff Garzik f590653377 RPC: add 'verifychain', to verify chain database at runtime 2013-06-19 11:53:02 -04:00
Jeff Garzik 543d70a676 Merge pull request #2747 from luke-jr/getblock_verbose0
Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
2013-06-10 08:16:39 -07:00
Luke Dashjr 2331952141 RPC: getblock(): Accept 2nd "verbose" parameter, similar to getrawtransaction, but defaulting to 1 for backward compatibility 2013-06-07 17:44:39 +00:00
Pieter Wuille 0fe8010a10 Make FindBlockByHeight constant-time.
Remove the pnext pointer in CBlockIndex, and replace it with a
vBlockIndexByHeight vector (no effect on memory usage). pnext can
now be replaced by vBlockIndexByHeight[nHeight+1], but
FindBlockByHeight becomes constant-time.

This also means the entire mapBlockIndex structure and the block
index entries in it become purely blocktree-related data, and
independent from the currently active chain, potentially allowing
them to be protected by separate mutexes in the future.
2013-05-12 19:52:16 +02:00
Pieter Wuille e31aa7c9d7 Improve gettxoutsetinfo command
* Bugfix: output the correct best block hash (during IBD, it can
  differ from the actual current best block)
* Add height to output
* Add hash_serialized, which is a hash of the entire UTXO state.
  Can be useful to compare two nodes.
* Add total_amount, the sum of all UTXOs' values.
2013-05-01 17:21:43 +02:00
Pieter Wuille 4e68391a7f Make output of gettxout RPC more consistent
* Report "value" in BTC, rather than "amount" in satoshis
* Use ScriptPubKeyToJSON to report script data
2013-01-04 22:51:11 +01:00
Pieter Wuille e754cf4133 Split off CBlockHeader from CBlock
Cleaner and removes the need for the application-specific flags in
serialize.h.
2012-11-16 00:12:33 +01:00
Pieter Wuille beeb57610c Add gettxout and gettxoutsetinfo RPCs 2012-10-20 23:08:57 +02:00
Wladimir J. van der Laan 738835d7b8 Document RPC error codes
Replace all "magic values" in RPCError(...) by constants.
2012-10-04 15:49:15 +02:00
Jeff Garzik c625ae04d2 RPC, cosmetic: move more RPC code to new rpcblockchain.cpp module 2012-08-21 11:03:38 -04:00