aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
AgeCommit message (Collapse)Author
2017-06-01Merge #10195: Switch chainstate db and cache to per-txout modelPieter Wuille
589827975 scripted-diff: various renames for per-utxo consistency (Pieter Wuille) a5e02bc7f Increase travis unit test timeout (Pieter Wuille) 73de2c1ff Rename CCoinsCacheEntry::coins to coin (Pieter Wuille) 119e552f7 Merge CCoinsViewCache's GetOutputFor and AccessCoin (Pieter Wuille) 580b02309 [MOVEONLY] Move old CCoins class to txdb.cpp (Pieter Wuille) 8b25d2c0c Upgrade from per-tx database to per-txout (Pieter Wuille) b2af357f3 Reduce reserved memory space for flushing (Pieter Wuille) 41aa5b79a Pack Coin more tightly (Pieter Wuille) 97072d668 Remove unused CCoins methods (Pieter Wuille) ce23efaa5 Extend coins_tests (Pieter Wuille) 508307968 Switch CCoinsView and chainstate db from per-txid to per-txout (Pieter Wuille) 4ec0d9e79 Refactor GetUTXOStats in preparation for per-COutPoint iteration (Pieter Wuille) 13870b56f Replace CCoins-based CTxMemPool::pruneSpent with isSpent (Pieter Wuille) 05293f3cb Remove ModifyCoins/ModifyNewCoins (Pieter Wuille) 961e48397 Switch tests from ModifyCoins to AddCoin/SpendCoin (Pieter Wuille) 8b3868c1b Switch CScriptCheck to use Coin instead of CCoins (Pieter Wuille) c87b957a3 Only pass things committed to by tx's witness hash to CScriptCheck (Matt Corallo) f68cdfe92 Switch from per-tx to per-txout CCoinsViewCache methods in some places (Pieter Wuille) 000391132 Introduce new per-txout CCoinsViewCache functions (Pieter Wuille) bd83111a0 Optimization: Coin&& to ApplyTxInUndo (Pieter Wuille) cb2c7fdac Replace CTxInUndo with Coin (Pieter Wuille) 422634e2f Introduce Coin, a single unspent output (Pieter Wuille) 7d991b55d Store/allow tx metadata in all undo records (Pieter Wuille) c3aa0c119 Report on-disk size in gettxoutsetinfo (Pieter Wuille) d34242430 Remove/ignore tx version in utxo and undo (Pieter Wuille) 7e0032290 Add specialization of SipHash for 256 + 32 bit data (Pieter Wuille) e484652fc Introduce CHashVerifier to hash read data (Pieter Wuille) f54580e7e error() in disconnect for disk corruption, not inconsistency (Pieter Wuille) e66dbde6d Add SizeEstimate to CDBBatch (Pieter Wuille) Tree-SHA512: ce1fb1e40c77d38915cd02189fab7a8b125c7f44d425c85579d872c3bede3a437760997907c99d7b3017ced1c2de54b2ac7223d99d83a6658fe5ef61edef1de3
2017-06-01scripted-diff: various renames for per-utxo consistencyPieter Wuille
Thanks to John Newberry for pointing these out. -BEGIN VERIFY SCRIPT- sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h -END VERIFY SCRIPT-
2017-06-01Upgrade from per-tx database to per-txoutPieter Wuille
2017-06-01Switch CCoinsView and chainstate db from per-txid to per-txoutPieter Wuille
This patch makes several related changes: * Changes the CCoinsView virtual methods (GetCoins, HaveCoins, ...) to be COutPoint/Coin-based rather than txid/CCoins-based. * Changes the chainstate db to a new incompatible format that is also COutPoint/Coin based. * Implements reconstruction code for hash_serialized_2. * Adapts the coins_tests unit tests (thanks to Russell Yanofsky). A side effect of the new CCoinsView model is that we can no longer use the (unreliable) test for transaction outputs in the UTXO set to determine whether we already have a particular transaction.
2017-05-30add SeedNodes to CConnman::OptionsMarko Bencun
Start of a series of changes to clean up the instantiation of connman by decoupling the command line arguments.
2017-05-17Merge #10395: Replace boost::function with std::function (C++11)Pieter Wuille
1b936f5 Replace boost::function with std::function (C++11) (practicalswift) Tree-SHA512: c4faec8cf3f801842010976115681f68ffa08fbc97ba50b22e95c936840f47e1b3bd8d7fd2f5b4e094b5a46bf3d29fc90b69d975a99e77322c0d19f8a00d53d3
2017-05-17Merge #10199: Better fee estimatesPieter Wuille
38bc1ec Make more json-like output from estimaterawfee (Alex Morcos) 2d2e170 Comments and improved documentation (Alex Morcos) ef589f8 minor cleanup: remove unnecessary variable (Alex Morcos) 3ee76d6 Introduce a scale factor (Alex Morcos) 5f1f0c6 Historical block span (Alex Morcos) aa19b8e Clean up fee estimate debug printing (Alex Morcos) 10f7cbd Track first recorded height (Alex Morcos) 3810e97 Rewrite estimateSmartFee (Alex Morcos) c7447ec Track failures in fee estimation. (Alex Morcos) 4186d3f Expose estimaterawfee (Alex Morcos) 2681153 minor refactor: explicitly track start of new bucket range and don't update curNearBucket on final loop. (Alex Morcos) 1ba43cc Make EstimateMedianVal smarter about small failures. (Alex Morcos) d3e30bc Refactor to update moving average on fly (Alex Morcos) e5007ba Change parameters for fee estimation and estimates on all 3 time horizons. (Alex Morcos) c0a273f Change file format for fee estimates. (Alex Morcos) Tree-SHA512: 186e7508d86a1f351bb656edcd84ee9091f5f2706331eda9ee29da9c8eb5bf67b8c1f2abf6662835560e7f613b1377099054f20767f41ddcdbc89c4f9e78946d
2017-05-15Merge #9494: Introduce an ArgsManager class encapsulating cs_args, mapArgs ↵Wladimir J. van der Laan
and mapMultiArgs 78da882 Util: Small improvements in gArgs usage (Jorge Timón) 5292245 Util: Put mapMultiArgs inside ArgsManager (Jorge Timón) b3cbd55 scripted-diff: Util: Encapsulate mapMultiArgs behind gArgs (Jorge Timón) f2957ce Util: Create ArgsManager class... (Jorge Timón) Tree-SHA512: 7d58250da440ad0f41745f46ab6021d6ecbb292035cab3d86fb08ce6bd822df604ac31b3ded6fd6914f7cfd12ba531cbc06a76eb500f629627f47ae6ac8350a7
2017-05-13Replace boost::function with std::function (C++11)practicalswift
2017-05-10Track failures in fee estimation.Alex Morcos
Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool. Fix slight error in unit test.
2017-05-09Util: Small improvements in gArgs usageJorge Timón
- Don't check gArgs.IsArgSet() is greater than 0 - Remove unneeded calls and local variables
2017-05-09scripted-diff: Util: Encapsulate mapMultiArgs behind gArgsJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/mapMultiArgs.count(/gArgs.IsArgSet(/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i 's/mapMultiArgs.at("/gArgs.GetArgs("/g' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-05-09Merge #8855: Use a proper factory for creating chainparamsWladimir J. van der Laan
c1082a7 Chainparams: Use the factory for pow tests (Jorge Timón) 2351a06 Chainparams: Get rid of CChainParams& Params(std::string) (Jorge Timón) f87f362 Chainparams: Use a regular factory for creating chainparams (Jorge Timón) Tree-SHA512: 359c8a2a1bc9d02db7856d02810240ada28048ac088f878b575597a7255cdb0ffdd1a647085ee67a34c6a7e7ed9e6cfdb61240cf6e75139619b640dbb096072c
2017-05-03Chainparams: Get rid of CChainParams& Params(std::string)Jorge Timón
2017-05-03Chainparams: Use a regular factory for creating chainparamsJorge Timón
2017-05-03Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus moduleJorge Timón
...from amount.o to policy/feerate.o Policy, because it moves policy code to the policy directory (common module)
2017-05-03Merge #9966: Control mempool persistence using a command line parameterWladimir J. van der Laan
a750d77 Add tests for mempool persistence (John Newbery) 91c91e1 Control mempool persistence using a command line parameter. (John Newbery) Tree-SHA512: 157d01cefd1903b8bfc5cbab42a3cc5e9c1094179bf4b64b3d34c0d4d9b976d593755bfea5c41c631cb758e1de17c6c2058c130d487d20560b7c0bafcddfa520
2017-04-27Add -stopatheight for benchmarkingPieter Wuille
2017-04-10Read and Write fee estimate file directly from CBlockPolicyEstimatorAlex Morcos
2017-04-06Merge #9902: Lightweight abstraction of boost::filesystemWladimir J. van der Laan
f110272 Remove `namespace fs=fs` (Wladimir J. van der Laan) 75594bd torcontrol: Use fs::path instead of std::string for private key path (Wladimir J. van der Laan) 2a5f574 Use fsbridge for fopen and freopen (Wladimir J. van der Laan) bac5c9c Replace uses of boost::filesystem with fs (Wladimir J. van der Laan) 7d5172d Replace includes of boost/filesystem.h with fs.h (Wladimir J. van der Laan) 19e36bb Add fs.cpp/h (Wladimir J. van der Laan) Tree-SHA512: 2c34f059dfa6850b9323f3389e9090a6b5f839a457a2960d182c2ecfafd9883c956f5928bb796613402d3aad68ebc78259796a7a313f4a6cfa98aaf507a66842
2017-04-05Merge #10151: [logging] initialize flag variable to 0 (and continue if ↵Wladimir J. van der Laan
GetLogCategory() fails) cd7f394 initialize flag variable to 0 (and continue if GetLogCategory() fails) (John Newbery) Tree-SHA512: d0f2653bd0e71ed763220cb08d3a5335c5bdfe2f54ff7f9302d97f3265d7aa7f57606fe416a61aaac1535dbb046d0fb40a61f5a9d5cf234b042268e00ee7679d
2017-04-05Merge #10154: init: Remove redundant logging codeWladimir J. van der Laan
faafa80 init: Remove redundant logging code (MarcoFalke) Tree-SHA512: 5ad0e9aba0e25a36025dd4ee5e5fddd2c0039f95bafd0f33300ea59e2f9bba807da6a1a8b4311d6aad5a360b99163edf4a4f161cb13f0f38580d8d6b504c94ad
2017-04-05init: Remove redundant logging codeMarcoFalke
2017-04-05logging: Fix off-by-one for shrinkdebugfileMarcoFalke
2017-04-04initialize flag variable to 0 (and continue if GetLogCategory() fails)John Newbery
2017-04-03Add -debugexclude option to switch off logging for specified componentsJohn Newbery
2017-04-03Use fsbridge for fopen and freopenWladimir J. van der Laan
Abstracts away how a path is opened to a `FILE*`. Reduces the number of places where path is converted to a string for anything else but printing.
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-04-01Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell
This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
2017-03-31Merge #10095: refactor: Move GetDifficulty out of `rpc/server.h`Wladimir J. van der Laan
f885b67 refactor: Make rest.cpp dependency on `*toJSON` in `blockchain.cpp` explicit (Wladimir J. van der Laan) 8d8f28d refactor: Move RPCNotifyBlockChange out of `rpc/server.h` (Wladimir J. van der Laan) e6dcfee refactor: Move GetDifficulty out of `rpc/server.h` (Wladimir J. van der Laan) Tree-SHA512: fc2656611d18442f2fddba5ac1554d958151f6785c2039afdfc36735d7e71592d9686ff6cc7b2ad95180071d7514470e62c52d697c5a1e88f851bddaf5942edb
2017-03-29Merge #10088: Trivial: move several relay options into the relay help groupPieter Wuille
0fb2887 Move several relay options into the Relay help group (Jameson Lopp) Tree-SHA512: 31fdfd8c741adb6fe6806a28955f0fbbc9360b1d8c3d8a28684794822f1b3231fffab93357357d986b81a4532c9eeabb79e5ede9378ff3ad8930ceb6588d9eb6
2017-03-29Merge #10086: Trivial: move rpcserialversion into RPC option groupPieter Wuille
1403b1a move rpcserialversion into RPC option group (Jameson Lopp) Tree-SHA512: c56cc318ea09ac27a8e12b8b9a1006992dcb969e6112df5046975b548aad30f729a4204f4893c8fe9bf5b50442eba6c75b5f8dd6d1261cf83c938474e93e9a7e
2017-03-27refactor: Move RPCNotifyBlockChange out of `rpc/server.h`Wladimir J. van der Laan
2017-03-27Merge #10057: [init] Deduplicated sigaction() boilerplateWladimir J. van der Laan
81a3857 Deduplicated sigaction() boilerplate (Thomas Snider) Tree-SHA512: 705b73f285a3d76504ba01476e072fdce67731b65f309bb04e4bbd765556c37e127cb769b475de2d68b33f50d7737fb136aefa0fa7c725a11ad16a47b9d0365f
2017-03-26Move several relay options into the Relay help groupJameson Lopp
2017-03-26move rpcserialversion into RPC option groupJameson Lopp
2017-03-26remove 'noconnect' option from documentationJameson Lopp
2017-03-24Deduplicated sigaction() boilerplateThomas Snider
2017-03-22Control mempool persistence using a command line parameter.John Newbery
Mempool persistence was added in 3f78562df5e86a2a0a21812047fc3a7db8cee988, and is always on. This commit introduces a command-line parameter -persistmempool, which defaults to true. When set to false: - mempool.dat is not loaded when the node starts. - mempool.dat is not written when the node stops.
2017-03-16[LevelDB] Plug leveldb logs to bitcoin logsNicolasDorier
2017-03-07Merge #9602: Remove coin age priority and free transactions - implementationWladimir J. van der Laan
b421e6d Update example bitcoin.conf (Alex Morcos) 7d4e950 Allow setting minrelaytxfee to 0 (Alex Morcos) 359e8a0 [cleanup] Remove coin age priority completely. (Alex Morcos) f9b9371 [rpc] Remove priorityDelta from prioritisetransaction (Alex Morcos) 49be7e1 [rpc] Remove priority information from mempool RPC calls (Alex Morcos) 0315888 [test] Remove priority from tests (Alex Morcos) f838005 No longer allow "free" transactions (Alex Morcos) ad727f4 [rpc] sendrawtransaction no longer bypasses minRelayTxFee (Alex Morcos) fe282ac [cleanup] Remove estimatePriority and estimateSmartPriority (Alex Morcos) 400b151 [debug] Change -printpriority option (Alex Morcos) 272b25a [mining] Remove -blockprioritysize. (Alex Morcos) 12839cd [rpc] Remove estimatepriority and estimatesmartpriority. (Alex Morcos) ddf58c7 wallet: Remove sendfree (MarcoFalke) Tree-SHA512: a9a4499405923ce794ef18f9e334dbbd59dfc73a3dc2df6f85cc9c62af6f353ec2eed9c2d5e58e904f918d0d7ab738f403dd4939d9bc2276136864fe63710782
2017-03-06Use CScheduler for wallet flushing, remove ThreadFlushWalletDBMatt Corallo
2017-03-03Allow setting minrelaytxfee to 0Alex Morcos
Setting minrelaytxfee to 0 will allow all transactions regardless of fee to enter your mempool until it reaches its size limit. However now that mempool limiting is governed by a separate incrementalrelay fee, it is an unnecessary restriction to prevent a minrelaytxfee of 0.
2017-03-03No longer allow "free" transactionsAlex Morcos
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks) Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
2017-03-03Merge #9910: Docs: correct and elaborate -rpcbind docWladimir J. van der Laan
e5b449c Docs: correct and elaborate -rpcbind doc (Ian Kelling) Tree-SHA512: e1cdaa32f7248f304d463e3f37d7d5da23ee0e506bd453420b87f4cc9c704cc30214e41c9266294890d65f2ee270f9355f38b542e8c01452637bdbba8273c755
2017-03-03Merge #9774: Enable host lookups for -proxy and -onion parametersWladimir J. van der Laan
f36bdf0 Enable host lookups for -proxy and -onion parameters (Johnathan Corgan) Tree-SHA512: 40f5ef3954721333e58d34653874d9f6ac5426c817762d132838f3b6f968ca5ca05aa56d02fd742cb5a8dc040f1a28dad6d54f667342eceba62fb2af18b58fc0
2017-03-03Docs: correct and elaborate -rpcbind docIan Kelling
The default was incorrect unless -rpcallowip was also specified.
2017-03-01Merge #9821: util: Specific GetOSRandom for Linux/FreeBSD/OpenBSDWladimir J. van der Laan
7e6dcd9 random: Add fallback if getrandom syscall not available (Wladimir J. van der Laan) 7cad849 sanity: Move OS random to sanity check function (Wladimir J. van der Laan) aa09ccb squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly (Wladimir J. van der Laan) 224e6eb util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD (Wladimir J. van der Laan) Tree-SHA512: 9fd408b1316c69de86674f342339b2f89192fd317c8c036b5df4320f828fa263c7966146bfc1904c51137ee4a26e4cb0f560b2cd05e18cde4d808b9b92ad15c4
2017-02-28Merge #9822: Remove block file location upgrade codeWladimir J. van der Laan
4b183d3 Remove block file location upgrade code (Marko Bencun) Tree-SHA512: fac1fce95341e0df645c08c7e794195b22b54df08826aa8728f2f97aede1e42f724f8133781b97f836d4a392d044d08c846bce471a6b478582014f8be501a712