Age | Commit message (Collapse) | Author |
|
dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen)
e01a793 Refactor -alertnotify code (Gavin Andresen)
Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
|
|
This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.
Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.
And adds a forknotify.py regression test to make sure it works.
Tested using forknotify.py:
Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks
Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks
After final code in this pull:
Tests successful
|
|
Refactor common -alertnotify code into static CAlert::Notify method.
|
|
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille)
ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille)
058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille)
c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille)
f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
|
|
- also ensure alphabetical ordering in file header
|
|
eb6b3b2 Update English translation (Wladimir J. van der Laan)
b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)
|
|
e790c37 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker (Pieter Wuille)
5c1e798 Make signature cache optional (Pieter Wuille)
c7829ea Abstract out SignatureChecker (Pieter Wuille)
|
|
4bb30a1 Correct logging AcceptBlock()->AcceptBlockHeader() (R E Broadley)
|
|
938bcce CAutoFile: make file private (Philip Kaufmann)
0c35486 CBufferedFile: add explicit close function (Philip Kaufmann)
c9fb27d CBufferedFile: convert into a non-refcounted RAII wrapper (Philip Kaufmann)
|
|
There is only one message passed to AbortNode() that makes sense to
translate to the user specifically: Disk space is low. For the others
show a generic message and refer to debug.log for details.
Reduces the number of confusing jargon translation messages.
|
|
|
|
|
|
|
|
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
|
|
- it now takes over the passed file descriptor and closes it in the
destructor
- this fixes a leak in LoadExternalBlockFile(), where an exception could
cause the file to not getting closed
- disallow copies (like recently added for CAutoFile)
- make nType and nVersion private
|
|
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.
|
|
4705902 Avoid introducing a virtual into CChainParams (Wladimir J. van der Laan)
5e2e7fc Suggested corrections on comments, variable names. Also new test case testing the PoW skip in UNITTEST. (SergioDemianLerner)
a25fd6b Switch testing framework from MAIN to new UNITTEST network (SergioDemianLerner)
|
|
f74fc9b Print input index when signature validation fails, to aid debugging. (Mark Friedenbach)
217a5c9 When transaction outputs exceed inputs, show the offending amounts so as to aid debugging. (Mark Friedenbach)
|
|
584a358 Do merkle root and txid duplicates check simultaneously (Pieter Wuille)
|
|
|
|
aid debugging.
|
|
c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan)
a372168 Use a typedef for monetary values (Mark Friedenbach)
|
|
Also new test case testing the PoW skip in UNITTEST.
|
|
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
|
|
e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon)
6db83db Decouple CChain from mapBlockIndex (jtimon)
|
|
|
|
|
|
Move the txid duplicates check into BuildMerkleTree, where it can be done
much more efficiently (without needing to build a full txid set to detect
duplicates).
The previous version (using the std::set<uint256> to detect duplicates) was
also slightly too weak. A block mined with actual duplicate transactions
(which is invalid, due to the inputs of the duplicated transactions being
seen as double spends) would trigger the duplicates logic, resulting in the
block not being stored on disk, and rerequested. This change fixes that by
only triggering in the case of duplicated transactions that can actually
result in an identical merkle root.
|
|
|
|
Instead of storing CCoins entries directly in CCoinsMap, store a CCoinsCacheEntry
which additionally keeps track of whether a particular entry is:
* dirty: potentially different from its parent view.
* fresh: the parent view is known to not have a non-pruned version.
This allows us to skip non-dirty cache entries when pushing batches of changes up,
and to remove CCoins entries about transactions that are fully spent before the
parent cache learns about them.
|
|
All direct modifications are now done through ModifyCoins, and BatchWrite is
used for pushing batches of queued modifications up, so we don't need the
low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
|
|
Replace the mutable non-copying GetCoins method with a ModifyCoins, which
returns an encapsulated iterator, so we can keep track of concurrent
modifications (as iterators can be invalidated by those) and run cleanup
code after a modification is finished.
This also removes the overloading of the 'GetCoins' name.
|
|
|
|
6dcfda2 Don't pass nHashType to EvalScript nor CheckSig (jtimon)
2b23a87 Don't pass nHashType to VerifyScript (jtimon)
ce3649fb Remove CScriptCheck::nHashType (was always 0) (jtimon)
358562b Remove unused function main:VerifySignature (jtimon)
|
|
efad808 Avoid reject message feedback loops (Pieter Wuille)
|
|
604ee2a Remove tx from AlreadyAskedFor list once we receive it, not when we process it. (R E Broadley)
|
|
f7e3637 Eliminate extra assignment (Suhas Daftuar)
ec7eb0f When reindexing check for file before trying to open (refactored) (Suhas Daftuar)
|
|
|
|
Github-Pull: #4856
|
|
d920f7d Move g_signals.SetBestChain(..) below SyncWithWallets (Cozz Lovan)
|
|
|
|
|
|
|
|
|
|
|
|
There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.
This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.
|
|
Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.
|
|
|
|
|
|
540ac45 Avoid returning many "inv" orphans (Jeff Garzik)
d4168c8 Limit CNode::mapAskFor (Wladimir J. van der Laan)
|