aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2014-10-09Merge pull request #5059Gavin Andresen
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>
2014-10-09Trigger -alertnotify if network is upgrading without youGavin Andresen
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
2014-10-09Refactor -alertnotify codeGavin Andresen
Refactor common -alertnotify code into static CAlert::Notify method.
2014-10-08Merge pull request #4834Pieter Wuille
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)
2014-10-06fix a lock indentation in main.cppPhilip Kaufmann
- also ensure alphabetical ordering in file header
2014-10-06Merge pull request #5036Wladimir J. van der Laan
eb6b3b2 Update English translation (Wladimir J. van der Laan) b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)
2014-10-06Merge pull request #4890Wladimir 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)
2014-10-03Merge pull request #4887Pieter Wuille
4bb30a1 Correct logging AcceptBlock()->AcceptBlockHeader() (R E Broadley)
2014-10-02Merge pull request #4978Wladimir J. van der Laan
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)
2014-10-02Don't translate state.Abort() messagesWladimir J. van der Laan
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.
2014-10-02Replace SCRIPT_VERIFY_NOCACHE by flag directly to checkerPieter Wuille
2014-10-02Make signature cache optionalPieter Wuille
2014-10-03Correct logging AcceptBlock()->AcceptBlockHeader()R E Broadley
2014-10-02Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-10-02CBufferedFile: convert into a non-refcounted RAII wrapperPhilip Kaufmann
- 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
2014-10-02Revert merge of pull #4845Wladimir J. van der Laan
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.
2014-10-02Merge pull request #4845Wladimir J. van der Laan
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)
2014-10-02Merge pull request #5017Wladimir J. van der Laan
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)
2014-10-02Merge pull request #4926Pieter Wuille
584a358 Do merkle root and txid duplicates check simultaneously (Pieter Wuille)
2014-10-01Print input index when signature validation fails, to aid debugging.Mark Friedenbach
2014-10-01When transaction outputs exceed inputs, show the offending amounts so as to ↵Mark Friedenbach
aid debugging.
2014-10-01Merge pull request #4234Wladimir J. van der Laan
c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan) a372168 Use a typedef for monetary values (Mark Friedenbach)
2014-09-29Suggested corrections on comments, variable names.SergioDemianLerner
Also new test case testing the PoW skip in UNITTEST.
2014-09-29Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-09-29Merge pull request #4796Pieter Wuille
e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon) 6db83db Decouple CChain from mapBlockIndex (jtimon)
2014-09-26Use a typedef for monetary valuesMark Friedenbach
2014-09-25autofile: don't copy CAutoFile by valueCory Fields
2014-09-24Do merkle root and txid duplicates check simultaneouslyPieter Wuille
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.
2014-09-24Get rid of the dummy CCoinsViewCache constructor argPieter Wuille
2014-09-23Do not keep fully spent but unwritten CCoins entries cached.Pieter Wuille
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.
2014-09-23Get rid of CCoinsView's SetCoins and SetBestBlock.Pieter Wuille
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.
2014-09-23Use ModifyCoins instead of mutable GetCoins.Pieter Wuille
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.
2014-09-17Avoid copying undo dataPieter Wuille
2014-09-17Merge pull request #4555Wladimir J. van der Laan
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)
2014-09-16Merge pull request #4903Pieter Wuille
efad808 Avoid reject message feedback loops (Pieter Wuille)
2014-09-16Merge pull request #4460Wladimir J. van der Laan
604ee2a Remove tx from AlreadyAskedFor list once we receive it, not when we process it. (R E Broadley)
2014-09-16Merge pull request #4875Pieter Wuille
f7e3637 Eliminate extra assignment (Suhas Daftuar) ec7eb0f When reindexing check for file before trying to open (refactored) (Suhas Daftuar)
2014-09-15Eliminate extra assignmentSuhas Daftuar
2014-09-15Fixing compiler warning C4101ENikS
Github-Pull: #4856
2014-09-15Merge pull request #4798Wladimir J. van der Laan
d920f7d Move g_signals.SetBestChain(..) below SyncWithWallets (Cozz Lovan)
2014-09-12Don't pass nHashType to EvalScript nor CheckSigjtimon
2014-09-12Don't pass nHashType to VerifyScriptjtimon
2014-09-12Remove CScriptCheck::nHashType (was always 0)jtimon
2014-09-12Remove unused function main:VerifySignaturejtimon
2014-09-12Avoid reject message feedback loopsPieter Wuille
2014-09-10Store fewer orphan tx by default, add -maxorphantx optionGavin Andresen
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.
2014-09-10Stricter handling of orphan transactionsGavin Andresen
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.
2014-09-10When reindexing check for file before trying to open (refactored)Suhas Daftuar
2014-09-10Fix crashing bug caused by orphan(s) with duplicate prevout.hashGavin Andresen
2014-09-10Merge pull request #4878Wladimir J. van der Laan
540ac45 Avoid returning many "inv" orphans (Jeff Garzik) d4168c8 Limit CNode::mapAskFor (Wladimir J. van der Laan)