aboutsummaryrefslogtreecommitdiff
path: root/src/rpcblockchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | checkpoints: Decouple checkpoints from ParamsCory Fields2015-04-301-1/+1
|/ | | | Pass checkpoint data in as necessary
* Removed main.h dependency from rpcserver.cppEric Lombrozo2015-01-281-0/+19
| | | | | | | | Rebased by @laanwj: - update for RPC methods added since 84d13ee: setmocktime, invalidateblock, reconsiderblock. Only the first, setmocktime, required a change, the other two are thread safe.
* String conversions uint256 -> uint256SWladimir J. van der Laan2015-01-051-4/+4
| | | | | | | If uint256() constructor takes a string, uint256(0) will become dangerous when uint256 does not take integers anymore (it will go through std::string(const char*) making a NULL string, and the explicit keyword is no help).
* Replace direct use of 0 with SetNull and IsNullWladimir J. van der Laan2015-01-051-1/+1
| | | | | | Replace x=0 with .SetNull(), x==0 with IsNull(), x!=0 with !IsNull(). Replace uses of uint256(0) with uint256().
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* [REST] JSON output: remove block infos from tx details if it is nested in blockJonas Schnelli2014-12-091-1/+1
|
* [REST] /rest/block response with full tx detailsJonas Schnelli2014-12-091-2/+12
| | | | | - rest block request returns full unfolded tx details - /rest/block/notxdetails/<HASH> returns block where transactions are only represented by its hash
* Extra explanation for getchaintipsPieter Wuille2014-12-011-0/+6
|
* Merge pull request #5386Wladimir J. van der Laan2014-12-011-0/+27
|\ | | | | | | 1b91be4 Report status of chain tips (Pieter Wuille)
| * Report status of chain tipsPieter Wuille2014-11-271-0/+27
| |
* | Add 'invalidateblock' and 'reconsiderblock' RPC commands.Pieter Wuille2014-11-261-0/+76
|/ | | | | These can be used for testing reorganizations or for manual intervention in case of chain forks.
* Improve chainstate/blockindex disk writing policyPieter Wuille2014-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | There are 3 pieces of data that are maintained on disk. The actual block and undo data, the block index (which can refer to positions on disk), and the chainstate (which refers to the best block hash). Earlier, there was no guarantee that blocks were written to disk before block index entries referring to them were written. This commit introduces dirty flags for block index data, and delays writing entries until the actual block data is flushed. With this stricter ordering in writes, it is now safe to not always flush after every block, so there is no need for the IsInitialBlockDownload() check there - instead we just write whenever enough time has passed or the cache size grows too large. Also updating the wallet's best known block is delayed until this is done, otherwise the wallet may end up referring to an unknown block. In addition, only do a write inside the block processing loop if necessary (because of cache size exceeded). Otherwise, move the writing to a point after processing is done, after relaying.
* Update comments in src/rpc* to be doxygen compatibleMichael Ford2014-11-201-3/+3
|
* minor cleanup: include orders, end comments etc.Philip Kaufmann2014-10-311-1/+1
| | | | - no code changes
* Merge pull request #5115Wladimir J. van der Laan2014-10-271-0/+1
|\ | | | | | | 33dfbf5 rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo` (Wladimir J. van der Laan)
| * rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`Wladimir J. van der Laan2014-10-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* | getblockhash: throw JSONRPCError (not runtime_error)dexX72014-10-241-1/+1
|/
* RPC additions after headers-firstPieter Wuille2014-10-141-0/+2
|
* Get rid of the dummy CCoinsViewCache constructor argPieter Wuille2014-09-241-1/+1
|
* 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
|