Commit Graph

1019 Commits

Author SHA1 Message Date
Pieter Wuille c33652576c
Merge #10395: Replace boost::function with std::function (C++11)
1b936f5 Replace boost::function with std::function (C++11) (practicalswift)

Tree-SHA512: c4faec8cf3f801842010976115681f68ffa08fbc97ba50b22e95c936840f47e1b3bd8d7fd2f5b4e094b5a46bf3d29fc90b69d975a99e77322c0d19f8a00d53d3
2017-05-17 17:22:43 -07:00
Pieter Wuille 318ea50a1c
Merge #10199: Better fee estimates
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-17 13:15:07 -07:00
Wladimir J. van der Laan 41987aa92f
Merge #9494: Introduce an ArgsManager class encapsulating cs_args, mapArgs 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-15 07:39:25 +02:00
practicalswift 1b936f5926 Replace boost::function with std::function (C++11) 2017-05-13 17:59:09 +02:00
Alex Morcos c7447ec303 Track failures in fee estimation.
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-10 11:45:27 -04:00
Jorge Timón 78da882edd
Util: Small improvements in gArgs usage
- Don't check gArgs.IsArgSet() is greater than 0
- Remove unneeded calls and local variables
2017-05-09 21:37:34 +02:00
Jorge Timón b3cbd554d9
scripted-diff: Util: Encapsulate mapMultiArgs behind gArgs
-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-09 21:29:05 +02:00
Wladimir J. van der Laan c973cc5a43
Merge #8855: Use a proper factory for creating chainparams
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-09 10:31:45 +02:00
Jorge Timón 2351a064a6
Chainparams: Get rid of CChainParams& Params(std::string) 2017-05-03 18:15:54 +02:00
Jorge Timón f87f3626e3
Chainparams: Use a regular factory for creating chainparams 2017-05-03 18:15:47 +02:00
Jorge Timón 381a46e38f
Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus module
...from amount.o to policy/feerate.o

Policy, because it moves policy code to the policy directory (common module)
2017-05-03 18:00:13 +02:00
Wladimir J. van der Laan 2a183de0ec
Merge #9966: Control mempool persistence using a command line parameter
a750d77 Add tests for mempool persistence (John Newbery)
91c91e1 Control mempool persistence using a command line parameter. (John Newbery)

Tree-SHA512: 157d01cefd1903b8bfc5cbab42a3cc5e9c1094179bf4b64b3d34c0d4d9b976d593755bfea5c41c631cb758e1de17c6c2058c130d487d20560b7c0bafcddfa520
2017-05-03 11:03:48 +02:00
Pieter Wuille b297426c96 Add -stopatheight for benchmarking 2017-04-27 14:39:27 -07:00
Alex Morcos 5ba81e54e0 Read and Write fee estimate file directly from CBlockPolicyEstimator 2017-04-10 13:56:50 -04:00
Wladimir J. van der Laan 8c28670e92
Merge #9902: Lightweight abstraction of boost::filesystem
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-06 20:35:15 +02:00
Wladimir J. van der Laan c7e73eafa1
Merge #10151: [logging] initialize flag variable to 0 (and continue if GetLogCategory() fails)
cd7f394 initialize flag variable to 0 (and continue if GetLogCategory() fails) (John Newbery)

Tree-SHA512: d0f2653bd0e71ed763220cb08d3a5335c5bdfe2f54ff7f9302d97f3265d7aa7f57606fe416a61aaac1535dbb046d0fb40a61f5a9d5cf234b042268e00ee7679d
2017-04-05 11:30:10 +02:00
Wladimir J. van der Laan 3c95bd43d8
Merge #10154: init: Remove redundant logging code
faafa80 init: Remove redundant logging code (MarcoFalke)

Tree-SHA512: 5ad0e9aba0e25a36025dd4ee5e5fddd2c0039f95bafd0f33300ea59e2f9bba807da6a1a8b4311d6aad5a360b99163edf4a4f161cb13f0f38580d8d6b504c94ad
2017-04-05 11:28:07 +02:00
MarcoFalke faafa801e8 init: Remove redundant logging code 2017-04-05 01:03:26 +02:00
MarcoFalke faab6241d0 logging: Fix off-by-one for shrinkdebugfile 2017-04-05 00:42:48 +02:00
John Newbery cd7f39467a initialize flag variable to 0 (and continue if GetLogCategory() fails) 2017-04-04 14:59:35 -04:00
John Newbery 3bde556429 Add -debugexclude option to switch off logging for specified components 2017-04-03 09:04:42 -04:00
Wladimir J. van der Laan 2a5f574762 Use fsbridge for fopen and freopen
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-03 12:32:32 +02:00
Wladimir J. van der Laan bac5c9cf64 Replace uses of boost::filesystem with fs
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-03 12:32:32 +02:00
Wladimir J. van der Laan 7d5172d354 Replace includes of boost/filesystem.h with fs.h
This is step one in abstracting the use of boost::filesystem.
2017-04-03 12:32:32 +02:00
Gregory Maxwell 6b3bb3d9ba Change LogAcceptCategory to use uint32_t rather than sets of strings.
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-04-01 18:53:29 +00:00
Wladimir J. van der Laan 4aa07fa735
Merge #10095: refactor: Move GetDifficulty out of `rpc/server.h`
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-31 12:57:30 +02:00
Pieter Wuille 4bd0e9b90a
Merge #10088: Trivial: move several relay options into the relay help group
0fb2887 Move several relay options into the Relay help group (Jameson Lopp)

Tree-SHA512: 31fdfd8c741adb6fe6806a28955f0fbbc9360b1d8c3d8a28684794822f1b3231fffab93357357d986b81a4532c9eeabb79e5ede9378ff3ad8930ceb6588d9eb6
2017-03-29 00:31:34 -07:00
Pieter Wuille 7438ceac71
Merge #10086: Trivial: move rpcserialversion into RPC option group
1403b1a move rpcserialversion into RPC option group (Jameson Lopp)

Tree-SHA512: c56cc318ea09ac27a8e12b8b9a1006992dcb969e6112df5046975b548aad30f729a4204f4893c8fe9bf5b50442eba6c75b5f8dd6d1261cf83c938474e93e9a7e
2017-03-29 00:28:51 -07:00
Wladimir J. van der Laan 8d8f28dd52 refactor: Move RPCNotifyBlockChange out of `rpc/server.h` 2017-03-27 16:23:22 +02:00
Wladimir J. van der Laan 5114f81136
Merge #10057: [init] Deduplicated sigaction() boilerplate
81a3857 Deduplicated sigaction() boilerplate (Thomas Snider)

Tree-SHA512: 705b73f285a3d76504ba01476e072fdce67731b65f309bb04e4bbd765556c37e127cb769b475de2d68b33f50d7737fb136aefa0fa7c725a11ad16a47b9d0365f
2017-03-27 10:36:57 +02:00
Jameson Lopp 0fb288725b Move several relay options into the Relay help group 2017-03-26 15:02:26 -04:00
Jameson Lopp 1403b1a689 move rpcserialversion into RPC option group 2017-03-26 10:25:17 -04:00
Jameson Lopp d5690f1ab8 remove 'noconnect' option from documentation 2017-03-26 09:13:20 -04:00
Thomas Snider 81a3857c4e Deduplicated sigaction() boilerplate 2017-03-24 10:32:56 -07:00
John Newbery 91c91e140a Control mempool persistence using a command line parameter.
Mempool persistence was added in
3f78562df5, 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-22 11:17:17 -04:00
NicolasDorier cfce581d11 [LevelDB] Plug leveldb logs to bitcoin logs 2017-03-16 02:14:27 +00:00
Wladimir J. van der Laan 30ff3a2fc9
Merge #9602: Remove coin age priority and free transactions - implementation
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-07 19:30:23 +01:00
Matt Corallo 735d9b5362 Use CScheduler for wallet flushing, remove ThreadFlushWalletDB 2017-03-06 18:35:19 -05:00
Alex Morcos 7d4e9509ad Allow setting minrelaytxfee to 0
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-03 16:50:20 -05:00
Alex Morcos f838005444 No longer allow "free" transactions
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-03 16:50:19 -05:00
Wladimir J. van der Laan 53c300fb52
Merge #9910: Docs: correct and elaborate -rpcbind doc
e5b449c Docs: correct and elaborate -rpcbind doc (Ian Kelling)

Tree-SHA512: e1cdaa32f7248f304d463e3f37d7d5da23ee0e506bd453420b87f4cc9c704cc30214e41c9266294890d65f2ee270f9355f38b542e8c01452637bdbba8273c755
2017-03-03 17:22:44 +01:00
Wladimir J. van der Laan 90cb2a218e
Merge #9774: Enable host lookups for -proxy and -onion parameters
f36bdf0 Enable host lookups for -proxy and -onion parameters (Johnathan Corgan)

Tree-SHA512: 40f5ef3954721333e58d34653874d9f6ac5426c817762d132838f3b6f968ca5ca05aa56d02fd742cb5a8dc040f1a28dad6d54f667342eceba62fb2af18b58fc0
2017-03-03 16:22:22 +01:00
Ian Kelling e5b449c3e8 Docs: correct and elaborate -rpcbind doc
The default was incorrect unless -rpcallowip was also specified.
2017-03-03 04:14:10 -08:00
Wladimir J. van der Laan d19d45a1e6
Merge #9821: util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD
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-03-01 12:41:53 +01:00
Wladimir J. van der Laan b7547fa93e
Merge #9822: Remove block file location upgrade code
4b183d3 Remove block file location upgrade code (Marko Bencun)

Tree-SHA512: fac1fce95341e0df645c08c7e794195b22b54df08826aa8728f2f97aede1e42f724f8133781b97f836d4a392d044d08c846bce471a6b478582014f8be501a712
2017-02-28 12:31:33 +01:00
Alex Morcos 400b15147c [debug] Change -printpriority option
-printpriority output is now changed to only show the fee rate and hash of transactions included in a block by the mining code.
2017-02-27 11:23:50 -05:00
Alex Morcos 272b25a6a9 [mining] Remove -blockprioritysize.
Remove ability of mining code to fill part of a block with transactions sorted by coin age.
2017-02-27 11:23:50 -05:00
Cory Fields c5f008a416 don't throw std::bad_alloc when out of memory. Instead, terminate immediately 2017-02-25 01:09:11 -05:00
Marko Bencun ef9f495e93 Trivial: fix comments referencing AppInit2
It was refactored into multiple functions in
0cc8b6bc44.
2017-02-24 09:19:29 +09:00
Marko Bencun 4b183d33f3 Remove block file location upgrade code
An effort to reduce the size of AppInitMain().

The removed code upgrades the location of the block files when
upgrading to 0.8. 0.8 seems to be the oldest version still in use.
2017-02-22 20:32:47 +09:00