Commit graph

13515 commits

Author SHA1 Message Date
Russell Yanofsky
266a8114cb Use MTP for importmulti "now" timestamps 2017-02-10 15:40:28 -05:00
Russell Yanofsky
3cf991756c Add test to check new importmulti "now" value
Easiest way to test this was to expose the timestamp via the validateaddress
RPC (which was already looking up and returning key metadata).
2017-02-10 15:40:28 -05:00
Russell Yanofsky
442887f27f Require timestamps for importmulti keys
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
2017-02-10 15:40:28 -05:00
John Newbery
99c0e81b95 Fix BIP68 activation test 2017-02-10 13:13:48 -05:00
MarcoFalke
b860915f8b
Merge #9707: Fix RPC failure testing
9db8eec Fix RPC failure testing (John Newbery)
2017-02-10 18:02:56 +01:00
Matt Corallo
db2dc7a58c Move CNode::addrLocal access behind locked accessors 2017-02-10 11:32:41 -05:00
Matt Corallo
036073bf87 Move CNode::addrName accesses behind locked accessors 2017-02-10 11:32:41 -05:00
Matt Corallo
d8f2b8a8c0 Make nTimeBestReceived atomic 2017-02-10 11:32:41 -05:00
Matt Corallo
22b4966a29 Move [clean|str]SubVer writes/copyStats into a lock 2017-02-10 11:32:41 -05:00
Matt Corallo
0f31872615 Make nServices atomic 2017-02-10 11:32:41 -05:00
Matt Corallo
96f42d8a12 Make nStartingHeight atomic 2017-02-10 11:32:40 -05:00
Matt Corallo
512731bed0 Access fRelayTxes with cs_filter lock in copyStats 2017-02-10 11:32:40 -05:00
Matt Corallo
ae683c1b19 Avoid copying CNodeStats to make helgrind OK with buggy std::string 2017-02-10 11:32:40 -05:00
Matt Corallo
644f1234e2 Make nTimeConnected const in CNode 2017-02-10 11:32:40 -05:00
Cory Fields
321d0fc6b6 net: fix a few races. Credit @TheBlueMatt
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
2017-02-10 11:32:39 -05:00
Wladimir J. van der Laan
2447c1024e
Merge #9698: net: fix socket close race
9a0b784 net: add a lock around hSocket (Cory Fields)
45e2e08 net: rearrange so that socket accesses can be grouped together (Cory Fields)
2017-02-10 12:42:53 +01:00
Wladimir J. van der Laan
056aba2b4f Remove fallbacks for boost_filesystem < v3
Minimum boost version was bumped to 1.47.0 in #8920, which
means the configure step won't even pass with older boost.

This version has boost filesystem v3, which means the
(crappy) fallbacks for older versions can go.
2017-02-10 12:32:52 +01:00
Wladimir J. van der Laan
a60677e394 Pre-0.14.0 hardcoded seeds update 2017-02-10 11:04:34 +01:00
Wladimir J. van der Laan
bfa9393c06 contrib/seeds: Update PATTERN_AGENT
gmaxwell: Adds the newest versions, drops everything multiple softforks ago.
2017-02-10 11:04:33 +01:00
Wladimir J. van der Laan
4dfac2c950 Update seeds tooling to Python 3
All the other tooling scripts require Python 3, it makes sense to do so
here too.

Also document the dependency on python3-dnspython.
2017-02-10 10:29:09 +01:00
Wladimir J. van der Laan
7179e7ca0d qt: Periodic translations update 2017-02-10 08:56:36 +00:00
Wladimir J. van der Laan
5e903a5ed9 devtools: Handle Qt formatting characters edge-case in update-translations.py
If both numeric format specifiers and "others" are used, assume we're
dealing with a Qt-formatted message. In the case of Qt formatting (see
https://doc.qt.io/qt-5/qstring.html#arg) only numeric formats are
replaced at all. This means "(percentage: %1%)" is valid (which was
introduced in #9461), without needing any kind of escaping that would be
necessary for strprintf.  Without this, this function would wrongly
detect '%)' as a printf format specifier.
2017-02-10 08:56:27 +00:00
Jonas Schnelli
33f3b21407
Merge #9730: Remove bitseed.xf2.org form the dns seed list
ca9955e Remove bitseed.xf2.org form the dns seed list (Jonas Schnelli)
2017-02-10 09:14:21 +01:00
Pieter Wuille
41b8821adf Add updating of chainTxData to release process 2017-02-09 18:58:35 -08:00
Matt Corallo
66f861ade9 Add a test for P2P inactivity timeouts 2017-02-09 17:34:03 -05:00
John Newbery
467df390f0 Remove nonsense #undef foreach
This commit removes a preprocessor #undef for a macro that was never
defined. Should make no difference to compiled code.
2017-02-09 14:00:02 -05:00
Jonas Schnelli
ca9955e706
Remove bitseed.xf2.org form the dns seed list 2017-02-09 11:28:01 +01:00
Wladimir J. van der Laan
3ddfe29837 netbase: Do not print an error on connection timeouts through proxy
If a timeout happens while reading the proxy response, this effectively
means we timed out while connecting to the remote node. This is very
common for Tor, so do not print an error message.
2017-02-09 08:53:22 +01:00
Wladimir J. van der Laan
13f608582c netbase: Make InterruptibleRecv return an error code instead of bool 2017-02-09 08:51:53 +01:00
Wladimir J. van der Laan
36f9d3ae6d
Merge #9718: Qt/Intro: Various fixes
a9baa6d Bugfix: Qt/Intro: Pruned nodes never require *more* space (Luke Dashjr)
93ffba7 Bugfix: Qt/Intro: Chain state needs to be stored even with the full blockchain (Luke Dashjr)
c8cee26 Qt/Intro: Update block chain size (Luke Dashjr)
2017-02-09 07:30:10 +01:00
Luke Dashjr
f6d18f5b33 Qt/Intro: Explain a bit more what will happen first time 2017-02-09 05:07:19 +00:00
Koki Takahashi
36164faa33 Fix typo and spelling inconsistency in CONTRIBUTING.md
Fix spellings of GitHub

Remove unnecessary changes

Fix GitHub spelling on doc/translation_process.md
2017-02-09 11:56:44 +09:00
Luke Dashjr
50c56570b2 Qt/Intro: Storage shouldn't grow significantly with pruning enabled 2017-02-08 19:24:43 +00:00
Luke Dashjr
9adb694b17 Qt/Intro: Move sizeWarningLabel text into C++ code 2017-02-08 19:23:31 +00:00
Luke Dashjr
a9baa6d742 Bugfix: Qt/Intro: Pruned nodes never require *more* space 2017-02-08 19:16:00 +00:00
Luke Dashjr
93ffba7163 Bugfix: Qt/Intro: Chain state needs to be stored even with the full blockchain 2017-02-08 18:51:05 +00:00
Luke Dashjr
c8cee26100 Qt/Intro: Update block chain size 2017-02-08 18:51:05 +00:00
Matt Corallo
b436f92f72 qa: Expose on-connection to mininode listeners 2017-02-08 12:05:13 -05:00
Matt Corallo
8aaba7a6b7 qa: mininode learns when a socket connects, not its first action 2017-02-08 12:05:13 -05:00
John Newbery
9db8eecac1 Fix RPC failure testing
Make sure that RPC tests are actually checking failures correctly by:

- Catching JSON RPC exceptions and verifying the error codes and messages.
- Failing the test case if the JSON RPC exception isn't raised.
2017-02-08 10:24:02 -05:00
Wladimir J. van der Laan
dd163f5788
Merge #9674: Always enforce strict lock ordering (try or not)
618ee92 Further-enforce lockordering by enforcing directly after TRY_LOCKs (Matt Corallo)
2a962d4 Fixup style a bit by moving { to the same line as if statements (Matt Corallo)
8465631 Always enforce lock strict lock ordering (try or not) (Matt Corallo)
fd13eca Lock cs_vSend and cs_inventory in a consistent order even in TRY (Matt Corallo)
2017-02-08 14:46:43 +01:00
Wladimir J. van der Laan
6a55515a9b
Merge #9705: build: Add options to override BDB cflags/libs
5cc2ebb Update OpenBSD and FreeBSD build steps (Wladimir J. van der Laan)
8713de8 build: Add options to override BDB cflags/libs (Wladimir J. van der Laan)
2017-02-08 14:38:28 +01:00
MarcoFalke
d304fef374
Merge #9712: bench: Fix initialization order in registration
29c5328 bench: Fix initialization order in registration (Wladimir J. van der Laan)
2017-02-08 04:43:13 +01:00
Matt Corallo
2cbd1196b7 Disconnect peers which we do not receive VERACKs from within 60 sec 2017-02-07 17:44:46 -05:00
Matt Corallo
618ee9249b Further-enforce lockordering by enforcing directly after TRY_LOCKs 2017-02-07 14:15:28 -05:00
Wladimir J. van der Laan
29c53289a9 bench: Fix initialization order in registration
The initialization order of global data structures in different
implementation units is undefined. Making use of this is essentially
gambling on what the linker does, the so-called [Static initialization
order fiasco](https://isocpp.org/wiki/faq/ctors#static-init-order).

In this case it apparently worked on Linux but failed on OpenBSD and
FreeBSD.

To create it on first use, make the registration structure local to
a function.

Fixes #8910.
2017-02-07 19:07:29 +01:00
John Newbery
9949ebfa6a [Trivial] Remove incorrect help message from gettxoutproof() 2017-02-07 11:21:14 -05:00
practicalswift
a47da4b6fe Use z = std::max(x - y, 0); instead of z = x - y; if (z < 0) z = 0; 2017-02-07 15:46:38 +01:00
Wladimir J. van der Laan
b709fe7ffc
Merge #9532: Remove unused variables
90fd29b Remove unused int64_t nSinceLastSeen (practicalswift)
ac4a095 Remove unused Python variables (practicalswift)
2017-02-07 15:28:50 +01:00
Wladimir J. van der Laan
729de15b63
Merge #9604: [Trivial] add comment about setting peer as HB peer.
dd5b011 [Trivial] add comment about setting peer as HB peer. (John Newbery)
2017-02-07 13:03:57 +01:00