Commit graph

1464 commits

Author SHA1 Message Date
NicolasDorier a3e1984651 Consensus: Trivial transform BOOST_FOREACH into for loop 2016-07-16 11:08:52 +09:00
Wladimir J. van der Laan ca40ef6029
Merge #8312: Fix mempool DoS vulnerability from malleated transactions
46c9620 Test that unnecessary witnesses can't be used for mempool DoS (Suhas Daftuar)
bb66a11 Fix DoS vulnerability in mempool acceptance (Suhas Daftuar)
2016-07-14 08:21:13 +02:00
Wladimir J. van der Laan 1bc9c8085f
Merge #8271: [bugfix] Do not send witnesses in cmpctblock
252675e Do not send witnesses in cmpctblock (Pieter Wuille)
2016-07-14 08:17:22 +02:00
Suhas Daftuar 96fa95361f Improve handling of unconnecting headers
When processing a headers message that looks like a block announcement,
send peer a getheaders if the headers message won't connect.

Apply DoS points after too many consecutive unconnecting headers messages.
2016-07-12 13:12:40 -04:00
Suhas Daftuar bb66a11396 Fix DoS vulnerability in mempool acceptance
Moves the IsStandard check to happen after the premature-witness check,
so that adding a witness to a transaction can't prevent mempool acceptance.

Note that this doesn't address the broader category of potential mempool DoS
issues that affect transactions after segwit activation.
2016-07-07 15:49:26 -04:00
Wladimir J. van der Laan 042c323922
Merge #8275: Remove bad chain alert partition check
ab8be98 Remove bad chain alert partition check (BtcDrak)
2016-07-06 07:35:54 +02:00
Gregory Maxwell 4fbdc4365b Revert "net: Avoid duplicate getheaders requests." PR #8054
This reverts commit f93c2a1b7e.

This can cause synchronization to get stuck.
2016-07-05 20:45:14 +00:00
Wladimir J. van der Laan a5072a7730 util: Remove zero-argument versions of LogPrint and error
Changes in tinyformat, recently imported from upstream have made the
zero-argument versions of formatting functions unnecessary. Remove them.

This is a slight semantic change: `%` characters in the zero-argument
call are now regarded and need to be escaped. As for as I know, the only
use of this is in `main.cpp`.
2016-06-27 18:39:25 +02:00
Pieter Wuille 252675efc6 Do not send witnesses in cmpctblock 2016-06-26 20:19:00 +02:00
Alex Morcos 4f7ff00497 [qa] Add rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9
based switchover logic.

Fixes and py3 conversion by Marco Falke.
2016-06-22 15:43:01 +02:00
Pieter Wuille af87a67eff Do not use compact blocks when segwit is enabled 2016-06-22 15:43:00 +02:00
Pieter Wuille 6032f6930a Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
2016-06-22 15:43:00 +02:00
Pieter Wuille 2b1f6f9ccf BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Pieter Wuille 0ef1dd3e11 Refactor script validation to observe amounts
This is a preparation for BIP143 support.
2016-06-22 15:43:00 +02:00
Pieter Wuille b8a97498df BIP144: Handshake and relay (receiver side)
Service bit logic by Nicolas Dorier.

Only download blocks from witness peers after fork.
2016-06-22 15:42:59 +02:00
Pieter Wuille 8b49040854 BIP141: Commitment structure and deployment
Includes a fix by Suhas Daftuar and LongShao007
2016-06-22 15:42:59 +02:00
Pieter Wuille 449f9b8deb BIP141: Witness program 2016-06-22 15:42:59 +02:00
Pieter Wuille 7030d9eb47 BIP144: Serialization, hashes, relay (sender side)
Contains refactorings by Eric Lombrozo.
Contains fixup by Nicolas Dorier.
Contains cleanup of CInv::GetCommand by Alex Morcos
2016-06-22 15:42:59 +02:00
Wladimir J. van der Laan e9d76a161d
Merge #8068: Compact Blocks
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo)
ccd06b9 Elaborate bucket size math (Pieter Wuille)
0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo)
8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo)
678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo)
56ba516 Add reconstruction debug logging (Matt Corallo)
2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo)
927f8ee Add ability to fetch CNode by NodeId (Matt Corallo)
d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo)
00c4078 Add protocol messages for short-ids blocks (Matt Corallo)
e3b2222 Add some blockencodings tests (Matt Corallo)
f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo)
85ad31e Add partial-block block encodings API (Matt Corallo)
5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo)
cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo)
7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo)
96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-22 14:30:38 +02:00
Matt Corallo 48efec82f3 Fix some minor compact block issues that came up in review 2016-06-21 16:09:46 -07:00
Wladimir J. van der Laan 94ab58b5cc
Merge #8179: Evict orphans which are included or precluded by accepted blocks.
54326a6 Increase maximum orphan size to 100,000 bytes. (Gregory Maxwell)
8c99d1b Treat orphans as implicit inv for parents, discard when parents rejected. (Gregory Maxwell)
11cc143 Adds an expiration time for orphan tx. (Gregory Maxwell)
db0ffe8 This eliminates the primary leak that causes the orphan map to  always grow to its maximum size. (Gregory Maxwell)
1b0bcc5 Track orphan by prev COutPoint rather than prev hash (Pieter Wuille)
2016-06-20 14:53:33 +02:00
Matt Corallo 2f34a2e476 Get our "best three" peers to announce blocks using cmpctblocks 2016-06-19 23:06:55 -07:00
Matt Corallo d25cd3ec4e Add receiver-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 23:06:55 -07:00
Matt Corallo 9c837d5468 Add sender-side protocol implementation for CMPCTBLOCK stuff 2016-06-19 01:34:58 -07:00
Matt Corallo cbda71cf04 Move context-required checks from CheckBlockHeader to Contextual... 2016-06-19 01:34:57 -07:00
Matt Corallo 7c29ec9449 If AcceptBlockHeader returns true, pindex will be set.
Assert this instead of checking (and then dref'ing later anyway)
to make sure no one thinks they can change that postcondition of
AcceptBlockHeader..
2016-06-19 01:34:57 -07:00
Wladimir J. van der Laan e4bb4a85a5
Merge #8084: Add recently accepted blocks and txn to AttemptToEvictConnection.
6ee7f05 Allow disconnecting a netgroup with only one member in eviction. (Gregory Maxwell)
5d0ca81 Add recently accepted blocks and txn to AttemptToEvictConnection. (Gregory Maxwell)
2016-06-16 11:03:52 +02:00
Gregory Maxwell 5d0ca81f74 Add recently accepted blocks and txn to AttemptToEvictConnection.
This protects any not-already-protected peers who were the most
 recent four to relay transactions and most recent four to send
 blocks to us.
2016-06-15 20:19:07 +00:00
Gregory Maxwell 54326a6808 Increase maximum orphan size to 100,000 bytes.
Although this increases node memory usage in the worst case by perhaps
 30MB, the current behavior causes severe issues with dependent tx relay.
2016-06-15 09:56:42 +00:00
Gregory Maxwell 8c99d1b525 Treat orphans as implicit inv for parents, discard when parents rejected.
An orphan whos parents were rejected is never going to connect, so there
 is little utility in keeping it.

Orphans also helpfully tell us what we're missing, so go ahead and treat
 it as INVed.
2016-06-15 09:56:37 +00:00
Gregory Maxwell 11cc143895 Adds an expiration time for orphan tx.
This prevents higher order orphans and other junk from
 holding positions in the orphan map.  Parents delayed
 twenty minutes are more are unlikely to ever arrive.

The freed space will improve the orphan matching success rate for
 other transactions.
2016-06-15 09:56:28 +00:00
BtcDrak ab8be98fdb Remove bad chain alert partition check
As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.
2016-06-14 12:26:59 +01:00
Pieter Wuille ecd7fd37c8 Introduce REQUIRED_SERVICES constant 2016-06-13 17:40:16 +02:00
Pieter Wuille ee06e04369 Introduce enum ServiceFlags for service flags 2016-06-13 17:40:16 +02:00
Pieter Wuille 5e7ab16d29 Only store and connect to NODE_NETWORK nodes 2016-06-13 17:40:16 +02:00
Pieter Wuille fc83f18153 Verify that outbound connections have expected services 2016-06-13 17:40:16 +02:00
Pieter Wuille 3764dec36c Keep addrman's nService bits consistent with outbound observations 2016-06-13 17:40:16 +02:00
Wladimir J. van der Laan 44c1b1c9bb
Merge #8141: Continuing port of java comparison tool
ff2dcf2 Tests: Edit bloated varint test and add option for 'barely expensive' tests (mrbandrews)
12c5a16 Catch exceptions from non-canonical encoding and print only to log (mrbandrews)
291f8aa Continuing port of java comptool (mrbandrews)
8c9e681 Tests: Rework blockstore to avoid re-serialization. (mrbandrews)
2016-06-13 11:37:37 +02:00
Gregory Maxwell db0ffe80a0 This eliminates the primary leak that causes the orphan map to
always grow to its maximum size.

This does not go so far as to attempt to connect orphans made
 connectable by a new block.

Keeping the orphan map less full helps improve the reliability
 of relaying chains of transactions.
2016-06-10 20:42:03 +00:00
Pieter Wuille 1b0bcc5f95 Track orphan by prev COutPoint rather than prev hash 2016-06-10 19:51:20 +00:00
Wladimir J. van der Laan 1445835bd3
Merge #8154: drop vAddrToSend after sending big addr message
d3d02d5 drop vAddrToSend after sending big addr message (Kaz Wesley)
2016-06-09 08:13:14 +02:00
Pieter Wuille 4286f43025
Merge #8173: Use SipHash for node eviction (cont'd)
eebc232 test: Add more test vectors for siphash (Wladimir J. van der Laan)
8884830 Use C++11 thread-safe static initializers (Pieter Wuille)
c31b24f Use 64-bit SipHash of netgroups in eviction (Pieter Wuille)
9bf156b Support SipHash with arbitrary byte writes (Pieter Wuille)
053930f Avoid recalculating vchKeyedNetGroup in eviction logic. (Patrick Strateman)
2016-06-08 18:32:34 +02:00
Pieter Wuille 66ed450d77
Merge #7935: Versionbits: GBT support
12c708a getblocktemplate: Use version/force mutation to support pre-BIP9 clients (Luke Dashjr)
9879060 getblocktemplate: Explicitly handle the distinction between GBT-affecting softforks vs not (Luke Dashjr)
72cd6b2 qa/rpc-tests: bip9-softforks: Add tests for getblocktemplate versionbits updates (Luke Dashjr)
d3df40e Implement BIP 9 GBT changes (Luke Dashjr)
2016-06-08 15:44:07 +02:00
Wladimir J. van der Laan a7c41f2de0
Merge #8126: std::shared_ptr based CTransaction storage in mempool
288d85d Get rid of CTxMempool::lookup() entirely (Pieter Wuille)
c2a4724 Optimization: use usec in expiration and reuse nNow (Pieter Wuille)
e9b4780 Optimization: don't check the mempool at all if no mempool req ever (Pieter Wuille)
dbfb426 Optimize the relay map to use shared_ptr's (Pieter Wuille)
8d39d7a Switch CTransaction storage in mempool to std::shared_ptr (Pieter Wuille)
1b9e6d3 Add support for unique_ptr and shared_ptr to memusage (Pieter Wuille)
2016-06-08 14:01:18 +02:00
Wladimir J. van der Laan 2156fa23b8
Merge #8078: Disable the mempool P2P command when bloom filters disabled
3d3602f Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters (Jonas Schnelli)
beceac9 Disable the mempool P2P command when bloom filters disabled (Peter Todd)
2016-06-08 12:56:48 +02:00
Pieter Wuille 888483098e Use C++11 thread-safe static initializers 2016-06-07 16:29:03 +02:00
Wladimir J. van der Laan 22e0b35676
Merge #8136: Log/report in 10% steps during VerifyDB
8b78486 Log/report in 10% steps during VerifyDB (Jonas Schnelli)
2016-06-07 15:25:41 +02:00
Pieter Wuille 288d85ddf2 Get rid of CTxMempool::lookup() entirely 2016-06-07 13:44:56 +02:00
Jonas Schnelli 8b78486d02
Log/report in 10% steps during VerifyDB 2016-06-07 11:04:01 +02:00
Kaz Wesley d3d02d5145 drop vAddrToSend after sending big addr message
We send a newly-accepted peer a 1000-entry addr message, and then only use
vAddrToSend for small messages. Deallocate vAddrToSend after it's been used for
the big message to save about 40 kB per connected inbound peer.
2016-06-06 15:57:40 -07:00
Luke Dashjr d3df40e51a Implement BIP 9 GBT changes
- BIP9DeploymentInfo struct for static deployment info
- VersionBitsDeploymentInfo: Avoid C++11ism by commenting parameter names
- getblocktemplate: Make sure to set deployments in the version if it is LOCKED_IN
- In this commit, all rules are considered required for clients to support
2016-06-06 17:10:22 +00:00
Wladimir J. van der Laan 6b781df74f
Merge #8007: Minor locking improvements
f0fdda0 IsInitialBlockDownload: usually avoid locking (Kaz Wesley)
2016-06-06 15:45:40 +02:00
Pieter Wuille c2a4724642 Optimization: use usec in expiration and reuse nNow 2016-06-06 02:02:24 +02:00
Pieter Wuille e9b4780b29 Optimization: don't check the mempool at all if no mempool req ever 2016-06-06 02:02:23 +02:00
Pieter Wuille dbfb426b96 Optimize the relay map to use shared_ptr's
* Switch mapRelay to use shared_ptr<CTransaction>
* Switch the relay code to copy mempool shared_ptr's, rather than copying
  the transaction itself.
* Change vRelayExpiration to store mapRelay iterators rather than hashes
  (smaller and faster).
2016-06-06 02:00:23 +02:00
Kaz Wesley f0fdda0181 IsInitialBlockDownload: usually avoid locking
Optimistically test the latch bool before taking the lock.
For all IsInitialBlockDownload calls after the first to return false,
this avoids the need to lock cs_main.
2016-06-04 22:18:59 -07:00
Pieter Wuille 8d39d7a2cf Switch CTransaction storage in mempool to std::shared_ptr 2016-06-05 00:31:43 +02:00
instagibbs e39dc698ad comment nit: miners don't vote 2016-06-03 10:07:14 -04:00
Wladimir J. van der Laan c141c14c9f
Merge #7942: locking for Misbehave() and other cs_main locking fixes
719de56 lock cs_main for chainActive (Kaz Wesley)
efb54ba lock cs_main for State/Misbehaving (Kaz Wesley)
2016-06-03 15:29:28 +02:00
Pieter Wuille a82f03393a
Merge #7997: replace mapNextTx with slimmer setSpends
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
2016-06-03 01:26:50 +02:00
Kaz Wesley 9805f4af7e mapNextTx: use pointer as key, simplify value
Saves about 10% of application memory usage once the mempool warms up. Since the
mempool is DynamicUsage-regulated, this will translate to a larger mempool in
the same amount of space.

Map value type: eliminate the vin index; no users of the map need to know which
input of the transaction is spending the prevout.

Map key type: replace the COutPoint with a pointer to a COutPoint. A COutPoint
is 36 bytes, but each COutPoint is accessible from the same map entry's value.
A trivial DereferencingComparator functor allows indirect map keys, but the
resulting syntax is misleading: `map.find(&outpoint)`. Implement an indirectmap
that acts as a wrapper to a map that uses a DereferencingComparator, supporting
a syntax that accurately reflect the container's semantics: inserts and
iterators use pointers since they store pointers and need them to remain
constant and dereferenceable, but lookup functions take const references.
2016-06-02 12:31:51 -07:00
mrbandrews 12c5a16c4e Catch exceptions from non-canonical encoding and print only to log 2016-06-02 14:43:18 -04:00
Pieter Wuille 715e9fd745
Merge #8077: Consensus: Decouple from chainparams.o and timedata.o
ee9f4a5 Consensus: Decouple from chainparams.o and timedata.o (Jorge Timón)
2016-06-01 20:52:27 +02:00
Pieter Wuille 6a22373771
Merge #7960: Only use AddInventoryKnown for transactions
383fc10 Only use AddInventoryKnown for transactions (Suhas Daftuar)
2016-06-01 18:36:11 +02:00
Gregory Maxwell 4d8993b346 Defer inserting into maprelay until just before relaying.
This reduces the rate of not founds by better matching the far
 end expectations, it also improves privacy by removing the
 ability to use getdata to probe for a node having a txn before
 it has been relayed.
2016-05-31 15:35:45 +00:00
Wladimir J. van der Laan 862fd24b40
Merge #8080: Do not use mempool for GETDATA for tx accepted after the last mempool req.
7e908c7 Do not use mempool for GETDATA for tx accepted after the last mempool req. (Gregory Maxwell)
2016-05-31 15:47:32 +02:00
Pieter Wuille fa2637a3be Always require OS randomness when generating secret keys 2016-05-29 01:52:17 +02:00
Pieter Wuille c028c7b755
Merge #8049: Expose information on whether transaction relay is enabled in getnetwork
1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan)
581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
2016-05-26 15:02:16 +02:00
Gregory Maxwell 7e908c7b82 Do not use mempool for GETDATA for tx accepted after the last mempool req.
The ability to GETDATA a transaction which has not (yet) been relayed
 is a privacy loss vector.

The use of the mempool for this was added as part of the mempool p2p
 message and is only needed to fetch transactions returned by it.
2016-05-25 18:05:58 +00:00
Pieter Wuille 47a7cfb0aa
Merge #7795: UpdateTip: log only one line at most per block
f20d42e UpdateTip: log only one line at most per block (Wladimir J. van der Laan)
2016-05-25 18:18:56 +02:00
Suhas Daftuar bd477f4e8b VerifyDB: don't check blocks that have been pruned 2016-05-22 09:15:21 -04:00
Peter Todd beceac9bbf
Disable the mempool P2P command when bloom filters disabled
Only useful to SPV peers, and attackers... like bloom is a DoS vector as far
more data is sent than received.
2016-05-20 16:40:37 +02:00
Jorge Timón ee9f4a5b15 Consensus: Decouple from chainparams.o and timedata.o
Do it for the consensus-critical functions:

- CheckBlockHeader
- CheckBlock
- ContextualCheckBlockHeader
2016-05-20 14:53:03 +02:00
Wladimir J. van der Laan 239d419864
Merge #7917: Optimize reindex
b4d24e1 Report reindexing progress in GUI (Pieter Wuille)
d3d7547 Add -reindex-chainstate that does not rebuild block index (Pieter Wuille)
fb8fad1 Optimize ActivateBestChain for long chains (Pieter Wuille)
316623f Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards (Pieter Wuille)
d253ec4 Make ProcessNewBlock dbp const and update comment (Pieter Wuille)
2016-05-18 12:31:32 +02:00
Wladimir J. van der Laan 8e8bebc040
Merge #8054: net: Avoid duplicate getheaders requests.
f93c2a1 net: Avoid duplicate getheaders requests. (Daniel Kraft)
2016-05-18 12:28:19 +02:00
Pieter Wuille a68ec21f7e Use SipHash-2-4 for address relay selection 2016-05-17 20:04:46 +02:00
Pieter Wuille b4d24e142e Report reindexing progress in GUI 2016-05-17 00:45:58 +02:00
Pieter Wuille fb8fad1586 Optimize ActivateBestChain for long chains 2016-05-17 00:45:57 +02:00
Pieter Wuille 316623f2c1 Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards 2016-05-17 00:45:49 +02:00
Pieter Wuille d253ec4baa Make ProcessNewBlock dbp const and update comment 2016-05-17 00:40:55 +02:00
Gregory Maxwell d87b198b73 Remove unneeded feerate param from RelayTransaction/AcceptToMemoryPool. 2016-05-16 04:10:06 +00:00
Daniel Kraft f93c2a1b7e net: Avoid duplicate getheaders requests.
The current logic for syncing headers may lead to lots of duplicate
getheaders requests being sent:  If a new block arrives while the node
is in headers sync, it will send getheaders in response to the block
announcement.  When the headers arrive, the message will be of maximum
size and so a follow-up request will be sent---all of that in addition
to the existing headers syncing.  This will create a second "chain" of
getheaders requests.  If more blocks arrive, this may even lead to
arbitrarily many parallel chains of redundant requests.

This patch changes the behaviour to only request more headers after a
maximum-sized message when it contained at least one unknown header.
This avoids sustaining parallel chains of redundant requests.

Note that this patch avoids the issues raised in the discussion of
https://github.com/bitcoin/bitcoin/pull/6821:  There is no risk of the
node being permanently blocked.  At the latest when a new block arrives
this will trigger a new getheaders request and restart syncing.
2016-05-15 20:15:02 +02:00
Wladimir J. van der Laan 581ddff05c net: Add fRelayTxes flag
Add a fRelayTxes to keep track of the relay transaction flag
we send to other peers.
2016-05-12 14:12:46 +02:00
Wladimir J. van der Laan f7a21dae5d
Merge #8019: Remove state arg from ReconsiderBlock, rename to ResetBlockFailureFlags
657e07e Rename ReconsiderBlock func to reflect real behavior (instagibbs)
addb9d2 Remove state arg from ReconsiderBlock (instagibbs)
2016-05-10 12:43:22 +02:00
instagibbs 657e07efa3 Rename ReconsiderBlock func to reflect real behavior 2016-05-09 11:26:37 -04:00
Wladimir J. van der Laan a68f56e727
Merge #7958: Remove useless argument to AlertNotify.
b02119e Remove useless argument to AlertNotify. (Pavel Janík)
2016-05-09 13:34:00 +02:00
Wladimir J. van der Laan e29cfc48fc
Merge #7976: Remove obsolete reference to CValidationState from UpdateCoins.
c8b9248 Remove obsolete reference to CValidationState from UpdateCoins. (21E14)
2016-05-09 11:59:03 +02:00
instagibbs addb9d2a09 Remove state arg from ReconsiderBlock 2016-05-06 12:53:23 -04:00
Wladimir J. van der Laan efee32f381
Merge #7815: Break circular dependency main ↔ txdb
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
2016-05-06 10:03:09 +02:00
Wladimir J. van der Laan 3b9a0bf41f
Merge #7840: Several performance and privacy improvements to inv/mempool handling
b559914 Move bloom and feerate filtering to just prior to tx sending. (Gregory Maxwell)
4578215 Return mempool queries in dependency order (Pieter Wuille)
ed70683 Handle mempool requests in send loop, subject to trickle (Pieter Wuille)
dc13dcd Split up and optimize transaction and block inv queues (Pieter Wuille)
f2d3ba7 Eliminate TX trickle bypass, sort TX invs for privacy and priority. (Gregory Maxwell)
2016-05-05 13:14:40 +02:00
21E14 c8b92486c4 Remove obsolete reference to CValidationState from UpdateCoins. 2016-04-30 15:14:22 -04:00
Daniel Kraft f7c4f79f07 [trivial] Add missing const qualifiers.
Add some const qualifiers to references that are not modified and should
be marked as const.
2016-04-30 19:25:00 +02:00
Wladimir J. van der Laan a9c8b744e8
Merge #7952: Log invalid block hash to make debugging easier.
61c0170 Log invalid block hash to make debugging easier. (Pavel Janík)
2016-04-28 13:53:01 +02:00
Wladimir J. van der Laan d9594bfe0c
Merge #7514: Fix IsInitialBlockDownload for testnet
8aa7226 Fix IsInitialBlockDownload to play nice with testnet (jmacwhyte)
2016-04-28 12:55:35 +02:00
Pavel Janík b02119e463 Remove useless argument to AlertNotify.
It is always 'true', so useless.
2016-04-27 18:04:02 +02:00
Suhas Daftuar 383fc10ebb Only use AddInventoryKnown for transactions
filterInventoryKnown is only used when relaying transactions,
so stop adding block hashes to the filter.
2016-04-27 09:57:02 -04:00
Pavel Janík 61c01706cd Log invalid block hash to make debugging easier. 2016-04-26 22:22:59 +02:00
Kaz Wesley 719de56ab2 lock cs_main for chainActive
ActivateBestChain uses chainActive after releasing the lock; reorder operations
to move all access to synchronized object into existing LOCK(cs_main) block.
2016-04-25 18:12:30 -07:00
Kaz Wesley efb54ba065 lock cs_main for State/Misbehaving
ProcessMessage calls State(...) and Misbehaving(...) without holding the
required lock; add LOCK(cs_main) blocks.
2016-04-25 18:06:44 -07:00
Wladimir J. van der Laan 76176823ba
Merge #7919: Fix headers announcements edge case
3a99fb2 Fix headers announcements edge case (Suhas Daftuar)
2016-04-22 08:40:22 +02:00