aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
AgeCommit message (Collapse)Author
2014-10-31minor cleanup: include orders, end comments etc.Philip Kaufmann
- no code changes
2014-10-27Merge pull request #5115Wladimir J. van der Laan
33dfbf5 rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo` (Wladimir J. van der Laan)
2014-10-24getblockhash: throw JSONRPCError (not runtime_error)dexX7
2014-10-21rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`Wladimir J. van der Laan
This fixes an iterator leak resulting in bitcoind: db/version_set.cc:789: leveldb::VersionSet::~VersionSet(): Assertion `dummy_versions_.next_ == &dummy_versions_' failed." exception on shutdown. Also make sure to flush pcoinsTip before calling GetStats() to make sure we apply them to the current height.
2014-10-14RPC additions after headers-firstPieter Wuille
2014-09-24Get rid of the dummy CCoinsViewCache constructor argPieter Wuille
2014-09-04Introduce BlockMap type for mapBlockIndexPieter Wuille
2014-09-01Merge pull request #4768Wladimir J. van der Laan
2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
2014-08-29rpc: Compute number of confirmations of a block from block heightWladimir J. van der Laan
Currently this uses a CMerkleTx, but that makes no sense as we have the CBlockIndex available. As noted by @jgarzik.
2014-08-27Perform CVerifyDB on pcoinsdbview instead of pcoinsTipWladimir J. van der Laan
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.
2014-08-26Split up util.cpp/hWladimir J. van der Laan
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.
2014-08-14Closely track mempool byte total. Add "getmempoolinfo" RPC.Jeff Garzik
Goal: Gain live insight into the mempool. Groundwork for future work that caps mempool size.
2014-08-03Implement "getchaintips" RPC command to monitor blockchain forks.Daniel Kraft
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.
2014-07-10Avoid a segfault on getblock if it can't read a block from disk.Ruben Dario Ponticelli
2014-06-28Replace HexBits with strprintfjtimon
2014-06-17Add "chain" to getmininginfo, improve help in getblockchaininfojtimon
2014-06-12add NetworkIDString() to chainparamsPhilip Kaufmann
- returns the BIP70 network string - use that new function in the core and GUI code and remove unused code and functions
2014-06-11remove unused code from getblockchaininfo()Philip Kaufmann
2014-06-10small formatting, indentation and comment fixesPhilip Kaufmann
- contains zero code changes
2014-06-03VerifyDB progressCozz Lovan
2014-05-13removed a few unnecessary castsKamil Domanski
2014-05-13switch from boost int types to <stdint.h>Kamil Domanski
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-01-30small changes to rpc command help message stringsPhilip Kaufmann
2013-12-13Move `settxfee` from rpcblockchain to rpcwalletWladimir J. van der Laan
`settxfee` only affects the wallet, not the block chain.
2013-11-30Add verbose boolean to getrawmempoolGavin Andresen
Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
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.
2013-11-13Issue #1865 - Clean up RPC help messagessje
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-10Make CCoinsView use block hashes instead of indicesPieter Wuille
2013-11-10Cleanup code using forward declarations.Brandon Dahler
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-10-20Merge pull request #3119Pieter Wuille
db0e8cc Bump Year Number to 2013 (super3)
2013-10-20Bump Year Number to 2013super3
2013-10-11Refactor/encapsulate chain globals into a CChain classPieter Wuille
2013-09-12Add RPC call decodescriptPeter Todd
2013-09-05Make settxfee clear that units are btc/kb.Gregory Maxwell
2013-07-24Add 'chainwork' to getblockPeter Todd
Returns nChainWork from the block index, the total work done by all blocks since the genesis block.
2013-07-03RPC: add getbestblockhash, to return tip of best chainJeff Garzik
2013-06-23Moved CBlock::ReadFromDisk out of CBlock to functions ReadBlockFromDisk in ↵Eric Lombrozo
main.h
2013-06-19RPC: add 'verifychain', to verify chain database at runtimeJeff Garzik
2013-06-10Merge pull request #2747 from luke-jr/getblock_verbose0Jeff Garzik
Add verbose flag to getblock RPC so it is possible to get hex dumps of blocks
2013-06-07RPC: getblock(): Accept 2nd "verbose" parameter, similar to ↵Luke Dashjr
getrawtransaction, but defaulting to 1 for backward compatibility
2013-05-12Make FindBlockByHeight constant-time.Pieter Wuille
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-01Improve gettxoutsetinfo commandPieter Wuille
* 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-01-04Make output of gettxout RPC more consistentPieter Wuille
* Report "value" in BTC, rather than "amount" in satoshis * Use ScriptPubKeyToJSON to report script data
2012-11-16Split off CBlockHeader from CBlockPieter Wuille
Cleaner and removes the need for the application-specific flags in serialize.h.
2012-10-20Add gettxout and gettxoutsetinfo RPCsPieter Wuille
2012-10-04Document RPC error codesWladimir J. van der Laan
Replace all "magic values" in RPCError(...) by constants.
2012-08-21RPC, cosmetic: move more RPC code to new rpcblockchain.cpp moduleJeff Garzik