aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce BlockMap type for mapBlockIndexPieter Wuille2014-09-041-1/+1
|
* Merge pull request #4768Wladimir J. van der Laan2014-09-011-1/+1
|\ | | | | | | 2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
| * Perform CVerifyDB on pcoinsdbview instead of pcoinsTipWladimir J. van der Laan2014-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bypassing the main coins cache allows more thorough checking with the same memory budget. This has no effect on performance because everything ends up in the child cache created by VerifyDB itself. It has bugged me ever since #4675, which effectively reduced the number of checked blocks to reduce peak memory usage. - Pass the coinsview to use as argument to VerifyDB - This also avoids that the first `pcoinsTip->Flush()` after VerifyDB writes a large slew of unchanged coin records back to the database.
* | rpc: Compute number of confirmations of a block from block heightWladimir J. van der Laan2014-08-291-4/+6
|/ | | | | Currently this uses a CMerkleTx, but that makes no sense as we have the CBlockIndex available. As noted by @jgarzik.
* Split up util.cpp/hWladimir J. van der Laan2014-08-261-0/+1
| | | | | | | | | | | | | | | | Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
* Closely track mempool byte total. Add "getmempoolinfo" RPC.Jeff Garzik2014-08-141-0/+24
| | | | | Goal: Gain live insight into the mempool. Groundwork for future work that caps mempool size.
* Implement "getchaintips" RPC command to monitor blockchain forks.Daniel Kraft2014-08-031-0/+70
| | | | | | | | Port over https://github.com/chronokings/huntercoin/pull/19 from Huntercoin: This implements a new RPC command "getchaintips" that can be used to find all currently active chain heads. This is similar to the -printblocktree startup option, but it can be used without restarting just via the RPC interface on a running daemon.
* Avoid a segfault on getblock if it can't read a block from disk.Ruben Dario Ponticelli2014-07-101-1/+3
|
* Replace HexBits with strprintfjtimon2014-06-281-1/+1
|
* Add "chain" to getmininginfo, improve help in getblockchaininfojtimon2014-06-171-1/+1
|
* add NetworkIDString() to chainparamsPhilip Kaufmann2014-06-121-9/+6
| | | | | | - returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
* remove unused code from getblockchaininfo()Philip Kaufmann2014-06-111-3/+0
|
* small formatting, indentation and comment fixesPhilip Kaufmann2014-06-101-2/+2
| | | | - contains zero code changes
* VerifyDB progressCozz Lovan2014-06-031-1/+1
|
* removed a few unnecessary castsKamil Domanski2014-05-131-2/+2
|
* switch from boost int types to <stdint.h>Kamil Domanski2014-05-131-7/+7
|
* rpc: add `getblockchaininfo` and `getnetworkinfo`Wladimir J. van der Laan2014-05-061-0/+36
| | | | | | | | | | | | | 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)
* small changes to rpc command help message stringsPhilip Kaufmann2014-01-301-2/+2
|
* Move `settxfee` from rpcblockchain to rpcwalletWladimir J. van der Laan2013-12-131-24/+0
| | | | `settxfee` only affects the wallet, not the block chain.
* Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-12/+63
| | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* Split up bitcoinrpc (code movement only)Wladimir J. van der Laan2013-11-271-3/+1
| | | | | | | | | | | | | | 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.
* Issue #1865 - Clean up RPC help messagessje2013-11-131-16/+141
| | | | | | | | | | | | | | | | | | | 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
* Make CCoinsView use block hashes instead of indicesPieter Wuille2013-11-101-2/+4
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-2/+9
| | | | | | | | | 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.
* Merge pull request #3119Pieter Wuille2013-10-201-1/+1
|\ | | | | | | db0e8cc Bump Year Number to 2013 (super3)
| * Bump Year Number to 2013super32013-10-201-1/+1
| |
* | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-8/+8
|/
* Add RPC call decodescriptPeter Todd2013-09-121-2/+2
|
* Make settxfee clear that units are btc/kb.Gregory Maxwell2013-09-051-2/+2
|
* Add 'chainwork' to getblockPeter Todd2013-07-241-0/+1
| | | | | Returns nChainWork from the block index, the total work done by all blocks since the genesis block.
* RPC: add getbestblockhash, to return tip of best chainJeff Garzik2013-07-031-0/+9
|
* Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in ↵Eric Lombrozo2013-06-231-1/+1
| | | | main.h
* RPC: add 'verifychain', to verify chain database at runtimeJeff Garzik2013-06-191-0/+16
|
* Merge pull request #2747 from luke-jr/getblock_verbose0Jeff Garzik2013-06-101-3/+17
|\ | | | | Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
| * RPC: getblock(): Accept 2nd "verbose" parameter, similar to ↵Luke Dashjr2013-06-071-3/+17
| | | | | | | | getrawtransaction, but defaulting to 1 for backward compatibility
* | Make FindBlockByHeight constant-time.Pieter Wuille2013-05-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Improve gettxoutsetinfo commandPieter Wuille2013-05-011-1/+4
| | | | | | | | | | | | | | | | | | * 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.
* | Make output of gettxout RPC more consistentPieter Wuille2013-01-041-3/+4
| | | | | | | | | | * Report "value" in BTC, rather than "amount" in satoshis * Use ScriptPubKeyToJSON to report script data
* | Split off CBlockHeader from CBlockPieter Wuille2012-11-161-1/+1
| | | | | | | | | | Cleaner and removes the need for the application-specific flags in serialize.h.
* | Add gettxout and gettxoutsetinfo RPCsPieter Wuille2012-10-201-0/+62
|/
* Document RPC error codesWladimir J. van der Laan2012-10-041-1/+1
| | | | Replace all "magic values" in RPCError(...) by constants.
* RPC, cosmetic: move more RPC code to new rpcblockchain.cpp moduleJeff Garzik2012-08-211-0/+165