Jorge Timón
51aa24927e
Chainparams: Refactor: Decouple IsSuperMajority from Params()
10 years ago
Luke Dashjr
b05a89b2de
Non-grammatical language improvements
10 years ago
Corinne Dashjr
7e6d23b171
Bugfix: Grammar fixes
10 years ago
Cory Fields
699682304f
checkpoints: make checkpoints a member of CChainParams
...
This drops the virtual call and simplifies the logic
10 years ago
Cory Fields
739d6155d3
chainparams: use SeedSpec6's rather than CAddress's for fixed seeds
...
This negates the need for CAddress here at all
10 years ago
mrbandrews
f9ec3f0fad
Add block pruning functionality
...
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:
- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
reasonably be met, with some assumptions about block sizes, orphan rates,
etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
mainnet; defined separately for mainnet, testnet, and regtest in chainparams
as nPruneAfterHeight).
This unsets NODE_NETWORK if pruning is enabled.
Also included is an RPC test for pruning (pruning.py).
Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
10 years ago
Jorge Timón
bebe7282ff
Chainparams: Refactor: Remove redundant AllowMinDifficultyBlocks() getter
10 years ago
Jorge Timón
e8e8904dda
Chainparams: Cleanup: Delete CChainParams getters to attributes from Consensus::Params
10 years ago
Jorge Timón
4e382177ed
Chainparams: Refactor: Remove redundant HashGenesisBlock() getter
10 years ago
Cory Fields
fd311996e8
consensus: don't use arith_uint256 in consensus.h
...
Requiring arith_uint256 at such a base level is not good for modularity.
10 years ago
Pieter Wuille
3fcfbc8ac5
Add a consistency check for the block chain data structures
...
This adds a -checkblockindex (defaulting to true for regtest), which occasionally
does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and
mapBlocksUnlinked.
10 years ago
Jorge Timón
bd006110fb
Consensus: Refactor: Introduce Consensus::Params class
10 years ago
Wladimir J. van der Laan
3aa0130b96
test: remove fSkipProofOfWork
...
Not used, and REGTEST already allows creating blocks at
the lowerst possible difficulty.
10 years ago
Wladimir J. van der Laan
59bd89f116
test: Remove UNITTEST params
...
UNITTEST parameter are not used by any current tests, and the model
(modifyable parameters) is inconvenient when unit-testing. As
they are stored in a global structure eevery test
would have to (re)set up its own parameters.
For consistency it is also better to test with MAIN parameters.
10 years ago
Cory Fields
eec37136fd
make CMessageHeader a dumb storage class
...
It shouldn't know or care about bitcoind's chain param selection
10 years ago
Shaul Kfir
e5ece053da
Rename Interval() to DifficultyAdjustmentInterval()
10 years ago
Wladimir J. van der Laan
734f85c4f0
Use arith_uint256 where necessary
...
Also add conversion from/to uint256 where needed.
10 years ago
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
10 years ago
jtimon
eb0d34b494
Remove unused chainparam networkID
10 years ago
Luke Dashjr
d227011184
MOVEONLY: core/ -> primitives/
10 years ago
Pavel Janík
84738627ce
Fix all header defines
10 years ago
jtimon
99f41b9cf7
MOVEONLY: core.o -> core/block.o
10 years ago
Michael Ford
f2e03ffae9
Update comments in chainparams to be doxygen compatible
10 years ago
jtimon
6fd546dd96
Remove CChainParams::NetworkID()
10 years ago
jtimon
cc97210799
Add fTestnetToBeDeprecatedFieldRPC to CChainParams
10 years ago
jtimon
e11712df7e
Move checkpoint data selection to chainparams
10 years ago
Wladimir J. van der Laan
fbd36d8fb5
Avoid introducing a virtual into CChainParams
...
Treat fSkipProofOfWorkCheck the same as other parameters.
10 years ago
SergioDemianLerner
f0fd00cb77
Switch testing framework from MAIN to new UNITTEST network
...
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
10 years ago
Wladimir J. van der Laan
8d132431b4
Revert merge of pull #4845
...
It breaks the new mingw tests!
See
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845581
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845582
This reverts commit 4705902777
, 5e2e7fcb99
, a25fd6be13
.
10 years ago
Wladimir J. van der Laan
4705902777
Avoid introducing a virtual into CChainParams
...
Treat fSkipProofOfWorkCheck the same as other parameters.
10 years ago
SergioDemianLerner
a25fd6be13
Switch testing framework from MAIN to new UNITTEST network
...
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
10 years ago
Ross Nicoll
e84843c0db
Broken addresses on command line no longer trigger testnet.
...
When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
10 years ago
Philip Kaufmann
093303a887
add missing header end comments
...
- ensures a consistent usage in header files
- also add a blank line after the copyright header where missing
- also remove orphan new-lines at the end of some files
10 years ago
Wladimir J. van der Laan
84ce18ca93
Remove unnecessary dependencies for bitcoin-cli
...
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.
To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
11 years ago
jtimon
fd704c7b2c
move pow constants to chainparams
11 years ago
jtimon
b82b7ec3dc
Get rid of Params().RPCisTestNet()
11 years ago
Wladimir J. van der Laan
09eb201b1b
Remove `using namespace std` from header file
...
It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
11 years ago
Philip Kaufmann
f5ae6c9826
add NetworkIDString() to chainparams
...
- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
and functions
11 years ago
Philip Kaufmann
699fe635c6
remove wrong ; in chainparams.h and order includes
11 years ago
jtimon
c8c52de3a0
Replace virtual methods with static attributes, chainparams.h depends on
...
protocol.h instead of the other way around
11 years ago
jtimon
a3d946ebdc
Get rid of TestNet()
11 years ago
jtimon
6fc0fa63d9
Add RPCisTestNet chain parameter
11 years ago
jtimon
cfeb8235fd
Add RequireStandard chain parameter
11 years ago
jtimon
21913a9ac9
Add AllowMinDifficultyBlocks chain parameter
11 years ago
jtimon
d754f34e8d
Move majority constants to chainparams
11 years ago
jtimon
8d26721498
Get rid of RegTest()
11 years ago
jtimon
cb9bd83bba
Add DefaultCheckMemPool chain parameter
11 years ago
jtimon
2595b9ac23
Add DefaultMinerThreads chain parameter
11 years ago
jtimon
bfa9a1a638
Add MineBlocksOnDemand chain parameter
11 years ago
jtimon
1712adbe0b
Add MiningRequiresPeers chain parameter
11 years ago