Jianping Wu
781e53a22b
Fixed POW test cases.
6 years ago
Jianping Wu
30e907bac6
Digishield difficulty adjustment.
...
Changed block time to 2 minutes.
6 years ago
Adrian Gallagher
fee6799b12
Litecoin: Protocol and default settings
...
0) Adjust BIP30 enforcement values
1) Reduce amount that peers can adjust our time to eliminate an attack vector. Thanks to
coblee for this fix.
2) Zeitgeist2 patch - thanks to Lolcust and ArtForz. This fixes an issue where a
51% attack can change difficulty at will. Go back the full period unless it's the
first retarget after genesis.
3) Avoid overflow in CalculateNextWorkRequired(). Thanks to pooler for the overflow fix.
4) Zeitgeist2 bool fshift bnNew.bits(). Thanks to romanornr for this path.
5) SegWit ContextualCheckBlockHeader adjustment and extra coverage.
6) Reject peer proto version below 70002. Thanks to wtogami for this patch.
7) Send final alert message to nodes warning about removal of the alert system. Thanks to coblee for this patch.
8) Adjust default settings for Litecoin.
7 years ago
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
7 years ago
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
7 years ago
Daniel Cousens
972714c956
pow: GetNextWorkRequired never called with NULL pindexLast
8 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
21E14
c7aac2d557
Deprecating the remaining LogPrintf dependencies that were made obsolete in PR #7459 .
9 years ago
Jorge Timón
f3757a0391
Consensus: Decouple pow.cpp from util.h
9 years ago
Jorge Timón
e86756193e
MOVEONLY: non-consensus: from pow to chain:
...
- GetBlockProof
- GetBlockProofEquivalentTime
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
Eric Lombrozo
7801f4387d
Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation.
9 years ago
Pieter Wuille
f7303f9793
Use equivalent PoW for non-main-chain requests
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
1cc0e96e9c
Trivial optimization: use GetAncestor to compute new target
10 years ago
Jorge Timón
d698ef690f
Consensus: Refactor: Decouple pow.o from chainparams.o
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
Ross Nicoll
34e5015cd2
Add unit tests for next difficulty calculations
...
Split GetNextWorkRequired() into two functions to allow the difficulty calculations to
be tested without requiring a full blockchain.
Add unit tests to cover basic difficulty calculation, plus each of the min/max actual
time, and maximum difficulty target conditions.
10 years ago
Shaul Kfir
e5ece053da
Rename Interval() to DifficultyAdjustmentInterval()
10 years ago
Pavel Janík
5262fde0ec
Remove whitespaces before double colon in errors and logs
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
Michael Ford
78253fcbad
Remove references to X11 licence
10 years ago
Luke Dashjr
d227011184
MOVEONLY: core/ -> primitives/
10 years ago
jtimon
092b58d13d
CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex)
10 years ago
jtimon
22c4272bf4
MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include main.h -> chain.h)
10 years ago
jtimon
99f41b9cf7
MOVEONLY: core.o -> core/block.o
10 years ago
Pieter Wuille
f244c99c96
Remove CheckMinWork, as we always know all parent headers
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
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
Wladimir J. van der Laan
ad49c256c3
Split up util.cpp/h
...
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.
10 years ago
jtimon
654871d436
replace ComputeMinWork with CheckMinWork
10 years ago
jtimon
b343c1a1e3
Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits)
10 years ago
jtimon
c2c02f3fa9
Move UpdateTime to pow
10 years ago
jtimon
209377a7cb
Use GetBlockTime() more
11 years ago
jtimon
fd704c7b2c
move pow constants to chainparams
11 years ago
jtimon
df852d2bcc
Refactor proof of work related functions out of main
11 years ago