- 16 Feb, 2017 1 commit
-
-
Wladimir J. van der Laan authored
ba803efb Harden against mistakes handling invalid blocks (Suhas Daftuar)
-
- 15 Feb, 2017 5 commits
-
-
Wladimir J. van der Laan authored
9acf25cc Return error when importmulti called with invalid address. (Russell Yanofsky)
-
Wladimir J. van der Laan authored
4b6ccccc Selectively suppress deprecation warnings (Jonas Schnelli)
-
Suhas Daftuar authored
Fixes a bug in AcceptBlock() in invoking CheckBlock() with incorrect arguments, and restores a call to CheckBlock() from ProcessNewBlock() as belt-and-suspenders. Updates the (overspecified) tests to match behavior.
-
Wladimir J. van der Laan authored
a80f98b1 Use importmulti timestamp when importing watch only keys (Russell Yanofsky) a58370e6 Dedup nTimeFirstKey update logic (Russell Yanofsky)
-
Wladimir J. van der Laan authored
a47da4b6 Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; (practicalswift)
-
- 14 Feb, 2017 6 commits
-
-
Jonas Schnelli authored
0b4f273e Bugfix: Qt/Options: Restore persistent "restart required" notice (Luke Dashjr)
-
Wladimir J. van der Laan authored
d9434918 qa: add a test to detect leaky p2p messages (Cory Fields) 8650bbb6 qa: Expose on-connection to mininode listeners (Matt Corallo) 5b5e4f83 qa: mininode learns when a socket connects, not its first action (Matt Corallo) cbfc5a67 net: require a verack before responding to anything else (Cory Fields) 8502e7ac net: parse reject earlier (Cory Fields) c45b9fb5 net: correctly ban before the handshake is complete (Cory Fields)
-
Wladimir J. van der Laan authored
66f861ad Add a test for P2P inactivity timeouts (Matt Corallo) b436f92f qa: Expose on-connection to mininode listeners (Matt Corallo) 8aaba7a6 qa: mininode learns when a socket connects, not its first action (Matt Corallo) 2cbd1196 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
-
Wladimir J. van der Laan authored
266a8114 Use MTP for importmulti "now" timestamps (Russell Yanofsky) 3cf99175 Add test to check new importmulti "now" value (Russell Yanofsky) 442887f2 Require timestamps for importmulti keys (Russell Yanofsky)
-
Jonas Schnelli authored
-
Wladimir J. van der Laan authored
7179e7ca qt: Periodic translations update (Wladimir J. van der Laan) 5e903a5e devtools: Handle Qt formatting characters edge-case in update-translations.py (Wladimir J. van der Laan)
-
- 13 Feb, 2017 8 commits
-
-
Cory Fields authored
This is certainly not exhaustive, but it's better than nothing. Adds checks for: - Any message received before sending a version - Any message received other than version/reject before sending a verack It also tries to goad the remote into sending a pong, address, or block announcement.
-
Matt Corallo authored
-
Matt Corallo authored
-
Cory Fields authored
7a8c2519 made this logic hard to follow. After that change, messages would not be sent to a peer via SendMessages() before the handshake was complete, but messages could still be sent as a response to an incoming message. For example, if a peer had not yet sent a verack, we wouldn't notify it about new blocks, but we would respond to a PING with a PONG. This change makes the behavior straightforward: until we've received a verack, never send any message other than version/verack/reject. The behavior until a VERACK is received has always been undefined, this change just tightens our policy. This also makes testing much easier, because we can now connect but not send version/verack, and anything sent to us is an error.
-
Cory Fields authored
Prior to this change, all messages were ignored until a VERSION message was received, as well as possibly incurring a ban score. Since REJECT messages can be sent at any time (including as a response to a bad VERSION message), make sure to always parse them. Moving this parsing up keeps it from being caught in the if (pfrom->nVersion == 0) check below.
-
Cory Fields authored
7a8c2519 made a change to avoid getting into SendMessages() until the version handshake (VERSION + VERACK) is complete. That was done to avoid leaking out messages to nodes who could connect, but never bothered sending us their version/verack. Unfortunately, the ban tally and possible disconnect are done as part of SendMessages(). So after 7a8c2519, if a peer managed to do something bannable before completing the handshake (say send 100 non-version messages before their version), they wouldn't actually end up getting disconnected/banned. That's fixed here by checking the banscore as part of ProcessMessages() in addition to SendMessages().
-
Russell Yanofsky authored
Lack of error checking noticed by Alex Morcos <morcos@chaincode.com>
-
Luke Dashjr authored
-
- 11 Feb, 2017 2 commits
-
-
Wladimir J. van der Laan authored
a60677e3 Pre-0.14.0 hardcoded seeds update (Wladimir J. van der Laan) bfa9393c contrib/seeds: Update PATTERN_AGENT (Wladimir J. van der Laan) 4dfac2c9 Update seeds tooling to Python 3 (Wladimir J. van der Laan)
-
Pieter Wuille authored
db2dc7a5 Move CNode::addrLocal access behind locked accessors (Matt Corallo) 036073bf Move CNode::addrName accesses behind locked accessors (Matt Corallo) d8f2b8a8 Make nTimeBestReceived atomic (Matt Corallo) 22b4966a Move [clean|str]SubVer writes/copyStats into a lock (Matt Corallo) 0f318726 Make nServices atomic (Matt Corallo) 96f42d8a Make nStartingHeight atomic (Matt Corallo) 512731be Access fRelayTxes with cs_filter lock in copyStats (Matt Corallo) ae683c1b Avoid copying CNodeStats to make helgrind OK with buggy std::string (Matt Corallo) 644f1234 Make nTimeConnected const in CNode (Matt Corallo) 321d0fc6 net: fix a few races. Credit @TheBlueMatt (Cory Fields)
-
- 10 Feb, 2017 18 commits
-
-
Russell Yanofsky authored
When importing a watch-only address over importmulti with a specific timestamp, the wallet's nTimeFirstKey is currently set to 1. After this change, the provided timestamp will be used and stored as metadata associated with watch-only key. This can improve wallet performance because it can avoid the need to scan the entire blockchain for watch only addresses when timestamps are provided. Also adds timestamp to validateaddress return value (needed for tests). Fixes #9034.
-
Russell Yanofsky authored
Also make nTimeFirstKey member variable private. This is just a cleanup change, it doesn't change behavior in any significant way.
-
Russell Yanofsky authored
-
Russell Yanofsky authored
Easiest way to test this was to expose the timestamp via the validateaddress RPC (which was already looking up and returning key metadata).
-
Russell Yanofsky authored
Additionally, accept a "now" timestamp, to allow avoiding rescans for keys which are known never to have been used. Note that the behavior when "now" is specified is slightly different than the previous behavior when no timestamp was specified at all. Previously, when no timestamp was specified, it would avoid rescanning during the importmulti call, but set the key's nCreateTime value to 1, which would not prevent future block reads in later ScanForWalletTransactions calls. With this change, passing a "now" timestamp will set the key's nCreateTime to the current block time instead of 1. Fixes #9491
-
MarcoFalke authored
9db8eeca Fix RPC failure testing (John Newbery)
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Matt Corallo authored
-
Cory Fields authored
These are (afaik) all long-standing races or concurrent accesses. Going forward, we can clean these up so that they're not all individual atomic accesses. - Reintroduce cs_vRecv to guard receive-specific vars - Lock vRecv/vSend for CNodeStats - Make some vars atomic. - Only set the connection time in CNode's constructor so that it doesn't change
-
Wladimir J. van der Laan authored
9a0b784d net: add a lock around hSocket (Cory Fields) 45e2e085 net: rearrange so that socket accesses can be grouped together (Cory Fields)
-
Wladimir J. van der Laan authored
-