aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)Author
2014-05-20Merge pull request #4199Wladimir J. van der Laan
0a59723 Remove extraneous c_str (R E Broadley)
2014-05-20Remove extraneous c_strR E Broadley
2014-05-19Merge pull request #4173Wladimir J. van der Laan
8c93bf4 LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. (Ashley Holman) 7a0e84d ProcessGetData(): abort if a block file is missing from disk (Ashley Holman)
2014-05-12LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing.Ashley Holman
2014-05-12Merge pull request #4138Wladimir J. van der Laan
783b182 Remove dummy PRIszX macros for formatting (Wladimir J. van der Laan)
2014-05-11ProcessGetData(): abort if a block file is missing from diskAshley Holman
2014-05-09Merge pull request #4076Wladimir J. van der Laan
397668e Deduplicate uint* comparison operator logic (Pieter Wuille) df9eb5e Move {Get,Set}Compact from bignum to uint256 (Pieter Wuille) a703150 Add multiplication and division to uint160/uint256 (Pieter Wuille) 4d480c8 Exception instead of assigning 0 in case of wrong vector length (Pieter Wuille) eb2cbd7 Deduplicate shared code between uint160 and uint256 (Pieter Wuille)
2014-05-09Merge pull request #4134Wladimir J. van der Laan
aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
2014-05-09Move {Get,Set}Compact from bignum to uint256Pieter Wuille
2014-05-09Merge pull request #3843Wladimir J. van der Laan
787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd) 4d79098 Increase IsStandard() scriptSig length (Peter Todd) f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd) 6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd) 29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd) 68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
2014-05-09Merge pull request #3884Wladimir J. van der Laan
942b33a Split AcceptBlockHeader from AcceptBlock. (Pieter Wuille) f457347 Split up CheckBlock in a block and header version (Pieter Wuille)
2014-05-08Increase IsStandard() scriptSig lengthPeter Todd
Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs. Previously with the 500 byte scriptSig limit there were odd restrictions where even a 1-of-12 P2SH could be spent in a standard transaction(1), yet multisig scriptPubKey's requiring more signatures quickly ran out of scriptSig space. From a "stuff-data-in-the-blockchain" point of view not much has changed as with the prior commit now only allowing the dummy value to be null the newly allowed scriptSig space can only be used for signatures. In any case, just using more outputs is trivial and doesn't cost much. 1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73 Mined by BTC Guild.
2014-05-08Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY failsPeter Todd
2014-05-07Add missing cs_main lock to VerifyDBWladimir J. van der Laan
Fixes issue #4139.
2014-05-06Remove dummy PRIszX macros for formattingWladimir J. van der Laan
Size specifiers are no longer needed now that we use typesafe tinyformat for string formatting, instead of the system's sprintf. No functional changes. This continues the work in #3735.
2014-05-06Remove NumBlocksOfPeersWladimir J. van der Laan
Generally useless information. Only updates on connect time, not after that. Peers can easily lie and the median filter is not effective in preventing that. In the past it was used for progress display in the GUI but `CheckPoints::guessVerificationProgress` provides a better way that is now used. It was too easy to mislead it. Peers do lie about it in practice, see issue #4065. From the RPC, `getpeerinfo` gives the peer raw values, which are more useful.
2014-05-05Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constantsPeter Todd
2014-05-01Merge pull request #4109Wladimir J. van der Laan
6b29ccc Correct indentation (R E Broadley)
2014-04-30use standard __func__ instead of __PRETTY_FUNCTION__Philip Kaufmann
2014-04-30Correct indentationR E Broadley
2014-04-25Split AcceptBlockHeader from AcceptBlock.Pieter Wuille
Also modify some connection logic to deal with non-full blocks in the index.
2014-04-25Split up CheckBlock in a block and header versionPieter Wuille
2014-04-24Add MESSAGE_START_SIZE from chainparams when loading blocks from external files.Simon de la Rouviere
2014-04-23Add missing AssertLockHeld in ConnectBlockWladimir J. van der Laan
2014-04-18Solve chainActive-related locking issuesWladimir J. van der Laan
- In wallet and GUI code LOCK cs_main as well as cs_wallet when necessary - In main.cpp SendMessages move the TRY_LOCK(cs_main) up, to encompass the call to IsInitialBlockDownload. - Make ActivateBestChain, AddToBlockIndex, IsInitialBlockDownload, InitBlockIndex acquire the cs_main lock Fixes #3997
2014-04-17Add AssertLockHeld for cs_main to ChainActive-using functionsWladimir J. van der Laan
All functions that use ChainActive but do not aquire the cs_main lock themselves, need to be called with the cs_main lock held. This commit adds assertions to all externally callable functions that use chainActive or chainMostWork. This will flag usages when built with -DDEBUG_LOCKORDER.
2014-04-05Move assert(pindexNew); to above where we dereference pindexNew.Gregory Maxwell
2014-04-02Merge pull request #3842 from ditto-b/masterGavin Andresen
Fix for GetBlockValue() after block 13,440,000
2014-03-29Fix `-printblocktree` outputWladimir J. van der Laan
PrintBlockTree output was broken starting from e010af70. Everything appears on one line. PrintWallet() added the newline after a block, but this functionality was removed and no newline was added. Seemingly, no one noticed. Add a newline after the block information to fix this.
2014-03-11minor style cleanupsPhilip Kaufmann
2014-03-11Merge branch 'match_relay_fee' of git://github.com/mikehearn/bitcoinGavin Andresen
2014-03-11Merge pull request #3696Wladimir J. van der Laan
c4656e0 Add progress to initial display of latest block downloaded. (R E Broadley) 75b8953 Display progress of rescan. (R E Broadley)
2014-03-10Fix for GetBlockValue() after block 13,440,000ditto-b
Forces the block reward to zero when right shift in GetBlockValue() is undefined, after 64 reward halvings (block height 13,440,000).
2014-03-10Make mining fee policy match relay fee policy.Mike Hearn
This resolves a case in which a mismatch could be used to bloat up the mempool by sending transactions that pay enough fee to relay, but not to be mined, with the default policies.
2014-03-10Merge pull request #3514Wladimir J. van der Laan
f59d8f0 Per-peer block download tracking and stalled download detection. (Pieter Wuille)
2014-02-28Merge pull request #3694 from gavinandresen/vfspentGavin Andresen
Remove CWalletTx::vfSpent
2014-02-26Merge pull request #3735 from laanwj/2014_02_remove_PRIx64_completelyGavin Andresen
Remove PRIx64 usage completely
2014-02-26Remove CWalletTx::vfSpentGavin Andresen
Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
2014-02-24Merge pull request #3305 from mikehearn/fee_dropJeff Garzik
Drop fees by 10x due to the persistently higher exchange rate.
2014-02-24Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan
Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.
2014-02-22Don't use PRIx64 formatting derives from inttypes.hWladimir J. van der Laan
As the tinyformat-based formatting system (introduced in b77dfdc) is type-safe, no special format characters are needed to specify sizes. Tinyformat can support (ignore) the C99 prefixes such as "ll" but chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't include inttypes.h and define our own for compatibility. (an alternative would be to sweep the entire codebase using sed -i to get rid of the size specifiers but this has less diff impact)
2014-02-20Merge pull request #2910Wladimir J. van der Laan
d8b4b49 Don't store or send side-chain blocks lower than last checkpoint. (Ashley Holman)
2014-02-19Add progress to initial display of latest block downloaded.R E Broadley
2014-02-17Merge pull request #3666Wladimir J. van der Laan
bbfce8a fix non-standard reason string in main.cpp (Philip Kaufmann)
2014-02-16Merge pull request #3646Wladimir J. van der Laan
5770254 Copyright header updates s/2013/2014 on files whose last git commit was done in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does. (gubatron)
2014-02-14Handle "conflicted" transactions properlyGavin Andresen
Extend CMerkleTx::GetDepthInMainChain with the concept of a "conflicted" transaction-- a transaction generated by the wallet that is not in the main chain or in the mempool, and, therefore, will likely never be confirmed. GetDepthInMainChain() now returns -1 for conflicted transactions (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed). This makes getbalance, getbalance '*', and listunspent all agree when there are mutated transactions in the wallet. Before: listunspent: one 49BTC output getbalance: 96 BTC (change counted twice) getbalance '*': 46 BTC (spends counted twice) After: all agree, 49 BTC available to spend.
2014-02-13fix non-standard reason string in main.cppPhilip Kaufmann
2014-02-11Add HasCanonicalPushes(), and use it in IsStandardTxPieter Wuille
2014-02-09Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron
in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
2014-02-08Per-peer block download tracking and stalled download detection.Pieter Wuille
Keep track of which block is being requested (and to be requested) from each peer, and limit the number of blocks in-flight per peer. In addition, detect stalled downloads, and disconnect if they persist for too long. This means blocks are never requested twice, and should eliminate duplicate downloads during synchronization.