aboutsummaryrefslogtreecommitdiff
path: root/src/pow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce Dogecoin difficulty calculationsRoss Nicoll2021-05-291-7/+26
|
* Litecoin: Fix zeitgeist2 attack thanks to Lolcust and ArtForz. This fixes an ↵coblee2021-05-201-1/+7
| | | | issue where a 51% attack can change difficulty at will. Go back the full period unless it's the first retarget after genesis.
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-1/+1
| | | | | | | | | | | | | 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-
* pow: GetNextWorkRequired never called with NULL pindexLastDaniel Cousens2017-02-151-4/+1
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Deprecating the remaining LogPrintf dependencies that were made obsolete in ↵21E142016-04-271-2/+0
| | | | PR #7459.
* Consensus: Decouple pow.cpp from util.hJorge Timón2016-02-041-10/+2
|
* Merge #7311: MOVEONLY: Move non-consensus functions out of powWladimir J. van der Laan2016-02-021-32/+0
|\ | | | | | | e867561 MOVEONLY: non-consensus: from pow to chain: (Jorge Timón)
| * MOVEONLY: non-consensus: from pow to chain:Jorge Timón2016-01-121-32/+0
| | | | | | | | | | - GetBlockProof - GetBlockProofEquivalentTime
* | Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|/
* Added fPowNoRetargeting field to Consensus::Params that disables nBits ↵Eric Lombrozo2015-10-191-0/+3
| | | | recalculation.
* Use equivalent PoW for non-main-chain requestsPieter Wuille2015-04-221-0/+17
|
* consensus: don't use arith_uint256 in consensus.hCory Fields2015-04-101-4/+5
| | | | Requiring arith_uint256 at such a base level is not good for modularity.
* Trivial optimization: use GetAncestor to compute new targetPieter Wuille2015-03-261-3/+3
|
* Consensus: Refactor: Decouple pow.o from chainparams.oJorge Timón2015-03-261-20/+19
|
* test: remove fSkipProofOfWorkWladimir J. van der Laan2015-03-091-3/+0
| | | | | Not used, and REGTEST already allows creating blocks at the lowerst possible difficulty.
* Add unit tests for next difficulty calculationsRoss Nicoll2015-02-211-1/+6
| | | | | | | 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.
* Rename Interval() to DifficultyAdjustmentInterval()Shaul Kfir2015-02-171-4/+4
|
* Remove whitespaces before double colon in errors and logsPavel Janík2015-01-311-2/+2
|
* Use arith_uint256 where necessaryWladimir J. van der Laan2015-01-051-7/+8
| | | | Also add conversion from/to uint256 where needed.
* Added "Core" to copyright headerssandakersmann2014-12-191-1/+1
| | | | | Github-Pull: #5494 Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* MOVEONLY: core/ -> primitives/Luke Dashjr2014-12-031-1/+1
|
* CBlockIndex::GetBlockWork() + GetProofIncrement(nBits) -> ↵jtimon2014-10-291-2/+2
| | | | GetBlockProof(CBlockIndex)
* MOVEONLY: Move void UpdateTime() from pow.o to miner.o (plus fix include ↵jtimon2014-10-291-11/+1
| | | | main.h -> chain.h)
* MOVEONLY: core.o -> core/block.ojtimon2014-10-271-1/+1
|
* Remove CheckMinWork, as we always know all parent headersPieter Wuille2014-10-141-33/+0
|
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-10-021-0/+4
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Revert merge of pull #4845Wladimir J. van der Laan2014-10-021-4/+0
| | | | | | | | | | | 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 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-09-291-0/+4
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Merge pull request #4377Pieter Wuille2014-08-271-8/+40
|\ | | | | | | | | | | 654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
| * replace ComputeMinWork with CheckMinWorkjtimon2014-08-231-8/+15
| |
| * Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits)jtimon2014-08-231-0/+15
| |
| * Move UpdateTime to powjtimon2014-08-231-0/+10
| |
* | 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.
* Use GetBlockTime() morejtimon2014-07-071-1/+1
|
* move pow constants to chainparamsjtimon2014-06-231-17/+13
|
* Refactor proof of work related functions out of mainjtimon2014-06-231-0/+123