Commit Graph

15009 Commits

Author SHA1 Message Date
Matt Corallo
15a8fcf993 Add a CValidationInterface::NewPoWValidBlock callback 2018-02-08 11:06:22 +01:00
Matt Corallo
d28172f57e Call AcceptBlock with the block's shared_ptr instead of CBlock& 2018-02-08 11:06:22 +01:00
Matt Corallo
c99dd97339 [qa] Avoid race in preciousblock test.
If node 0 is sufficiently fast to announce its block to node 1,
node 1 might already have the block by the time the
node_sync_via_rpc loop gets around to node 1, resulting in the
submitblock result "duplicate-inconclusive" as node 1 has the block,
but prefers an alternate chain.
2018-02-08 11:06:22 +01:00
Matt Corallo
807ae74c21 Make CBlockIndex*es in net_processing const 2018-02-08 11:06:22 +01:00
Alexander Block
1d1c31052a Fix cmd args handling for -bip9params 2018-02-08 10:40:51 +01:00
Suhas Daftuar
64817fe1d3 [qa] Fix race condition in sendheaders.py
Also de-duplicates code that has been moved to mininode
2018-02-08 10:40:51 +01:00
Alexander Block
b2bc780994 Fix argument to wait_until 2018-02-08 10:40:51 +01:00
Wladimir J. van der Laan
026f2e2a8c Merge #8446: [Trivial] BIP9 parameters on regtest cleanup
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
2018-02-08 10:40:51 +01:00
Suhas Daftuar
e326bda69e Tests: refactor compact size serialization in mininode 2018-02-08 10:40:51 +01:00
Suhas Daftuar
2c810d2c3f Allow changing BIP9 parameters on regtest 2018-02-08 10:40:51 +01:00
Matt Corallo
45151bd131 Move context-required checks from CheckBlockHeader to Contextual... 2018-02-08 10:40:51 +01:00
Alexander Block
120893c63d Update timeLastMempoolReq when responding to MEMPOOL request (#1904)
This should have been part of the Bitcoin #8080 backporting but was missed
due to manual conflict resolution.
2018-02-08 08:47:27 +03:00
thephez
ca89c7b870 [Trivial] Update PrivateSend denominations in comments / typo fixes (#1910) 2018-02-08 08:46:44 +03:00
Alexander Block
8f2c1998de Rename vBlockHashesFromINV to vDelayedGetHeaders (#1909)
Use a name that better says what it is for.
2018-02-08 08:45:20 +03:00
UdjinM6
79e6d272ed
Merge pull request #1908 from codablock/pr_backport_bitcoin_0.14-12
Collection of PRs and single commits missed in previous backports
2018-02-08 08:45:02 +03:00
Alexander Block
6e022c57b1 Remove src/drafted folder (#1907)
This contained old PoC code and is unused
2018-02-08 08:44:34 +03:00
Alexander Block
0318c76ba2 Update links and references to current communication channels (#1906)
We don't really use freenode anymore. Also, it's dash.org/forum instead of
dashtalk.org today.
2018-02-08 08:44:21 +03:00
Alexander Block
4719ec477c Remove some locking in net.h/net.cpp (#1905)
* Remove unnecessary LOCK in ConnectNode

FindNode already does the necessary lock

* Remove unnecessary semicolon

* Remove critical section and assert for ref counts in CNode

nRefCount is an atomic now and thus doesn't need locking anymore.
2018-02-08 08:44:07 +03:00
Alexander Block
bb20b4e7b5 Few cleanups after backporting (#1903)
* Remove remains of workaround that was needed while backporting

* Add missing closing round bracket to help string

* Remove now unnecessary .encode() calls in wallet.py

Now that we only support python3, we can fix this TODO.
2018-02-08 08:43:50 +03:00
Nathan Marley
3c44dde2e7 Return JSON object for masternode count (by default but still support old modes for now) (#1900)
Get information about number of masternodes (DEPRECATED options: 'total', 'ps', 'enabled', 'qualify', 'all')
2018-02-08 08:43:19 +03:00
Wladimir J. van der Laan
1086851938 Merge pull request #7166
6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
2018-02-07 13:11:09 +01:00
Wladimir J. van der Laan
cef919f182 Merge #9486: Make peer=%d log prints consistent
e6111b2 Make peer id logging consistent ("peer=%d" instead of "peer %d") (Matt Corallo)
2018-02-07 13:11:09 +01:00
Russell Yanofsky
55ef4d0a9b [wallet] Add include_unsafe argument to listunspent RPC 2018-02-07 13:11:09 +01:00
Suhas Daftuar
e1e03f42c4 [wallet] Add IsAllFromMe: true if all inputs are from wallet 2018-02-07 13:11:08 +01:00
Wladimir J. van der Laan
611b31ecea Merge #9650: Better handle invalid parameters to signrawtransaction
6dbfe08 [qa] test signrawtransaction merge with missing inputs (Matt Corallo)
ec4f7e4 [qa] Add second input to signrawtransaction test case (Matt Corallo)
691710a [qa] Test that decoderawtransaction throws with extra data appended (Matt Corallo)
922bea9 Better handle invalid parameters to signrawtransaction (Matt Corallo)
7ea0ad5 Fail in DecodeHexTx if there is extra data at the end (Matt Corallo)
2018-02-07 13:11:08 +01:00
MarcoFalke
ff335e47fd [qa] test_framework: Add wrapper for stop_node 2018-02-07 13:11:08 +01:00
Alexander Block
64e1bfacdc Add BIP32 to bips.md 2018-02-07 10:50:13 +01:00
Wladimir J. van der Laan
4bb2af8d19 Merge #9114: [depends] Set OSX_MIN_VERSION to 10.8
617c96d [depends] Set OSX_MIN_VERSION to 10.8 (fanquake)
2018-02-07 10:47:44 +01:00
UdjinM6
9f2467af8a
Hide autocompleter on Enter/Return key (#1898) 2018-02-06 20:24:37 +03:00
UdjinM6
a7fa07a30e
Drop BOOST_FOREACH and use references in loops (const ref where applicable, Dash code only) (#1899)
* Drop BOOST_FOREACH in Dash-specific code (only), no changes in behavior

* Use references in loops (use const references where applicable) in Dash-specific code (only)

And adjust related code to make it compilable.

* Loop through nodes via connman.ForEachNode in dsq Relay instead of creating a copy
2018-02-06 14:09:33 +03:00
UdjinM6
4bc4a7dac7
Fix debug rpc (#1897) 2018-02-06 14:08:58 +03:00
UdjinM6
e0b6988a45
Various fixes and refactoring for Cache*Map classes (#1896)
* CacheMap::Insert should not update existing item, should return `false`

* Use `emplace` operator instead of `[]` to add new items in Cache*Map implementation

* Use prefix cm/cmm for CacheMap/CacheMultiMap maps respectively to distinguish them from each other and from std::map-s

* Avoid excessive processing of already known valid votes

Also prettify debug log output a bit

* Drop nCurrentSize from Cache*Map classes

Use `size()` and `empty()` of std classes instead, they have constant complexity since c++11

* Do not create an explicit iterator if it's never used later (in Cache*Map)

* Do not prune last item in CacheMultiMapInsert when trying to insert a duplicate one
2018-02-06 14:08:43 +03:00
Alexander Block
61af31531a Merge #8976: libconsensus: Add input validation of flags (#1891)
5ca8ef2 libconsensus: Add input validation of flags (Wladimir J. van der Laan)
2018-02-05 18:42:05 +03:00
UdjinM6
063bc55424
Fix masternode list (#1893) 2018-02-05 18:39:52 +03:00
Alexander Block
a6ba82ac9a Use masternode list to generate hardcoded seeds (#1892)
* Change makeseeds.py to use masternode list as input instead of DNS seed dump

* Allow 4 nodes per ASN

Lift the limitation a bit so we get more entries

* Update nodes_main.txt and nodes_test.txt

Generated with makeseeds.py based on current masternode lists

* Fix comment about the source of the seed nodes and use masternodelist rpc

* Use fixed OpenDNS servers for ASN filtering
2018-02-05 18:39:26 +03:00
Alexander Block
99b2789a73 Fix DeserializeAndCheckBlockTest benchmark and store hashDevnetGenesisBlock in consensus (#1888)
* Use Dash block for DeserializeAndCheckBlockTest

Replaced Bitcoin block with the largest Dash block I could find on mainnet.

* Store hashDevnetGenesisBlock in Consensus::Params

Remove the need for chainparams to be available when the devnetGenesis hash
is needed. Fixes a crash in CheckBlockHeader() when called from benchmarking
code, which does not initialize the Params() function.
2018-02-01 20:05:35 +03:00
UdjinM6
8a387ee09c
Drop SPORK_13_OLD_SUPERBLOCK_FLAG and check superblock start hash (#1872) 2018-02-01 15:42:21 +03:00
UdjinM6
5c00bfe679
Merge pull request #1887 from codablock/pr_backport_hd_wallet
Backport wallet-dump.py and key timestamp PRs
2018-02-01 15:40:23 +03:00
Alexander Block
00a0bc7103 Remove "TODO: fix off-by-one" 2018-02-01 11:13:01 +01:00
Alexander Block
625252fb49 Allow to pass redirect_stderr=True to initialize_chain and use in wallet-dump.py
Same as with start_node
2018-02-01 11:13:01 +01:00
Alexander Block
d56ac5a747 Fix import-rescan.py and add workaround for pruning mode
Added a workaround to the masternode+pruning mode check to allow pruning
in regtest. The actual bug behind the masternode+pruning check is not
touched this way. Please read the linked GitHub issues for details.
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
1ba1256217 Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescans
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky)
38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky)
c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky)
8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
75421c37b6 Merge #9764: wallet: Prevent "overrides a member function but is not marked 'override'" warnings
6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
43f697866e Merge #9108: Use importmulti timestamp when importing watch only keys (on top of #9682)
a80f98b Use importmulti timestamp when importing watch only keys (Russell Yanofsky)
a58370e Dedup nTimeFirstKey update logic (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
6f86725d00 Merge #9682: Require timestamps for importmulti keys
266a811 Use MTP for importmulti "now" timestamps (Russell Yanofsky)
3cf9917 Add test to check new importmulti "now" value (Russell Yanofsky)
442887f Require timestamps for importmulti keys (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Alexander Block
9c5032c540 Explicitly start nodes with -usehd=1 in wallet-dump.py
We currently have usehd defaulted to 0, so we need to explicitly start it
with usehd=1 in wallet-dump.py.

This requires setting up a new data dirs cache for hd as the wallets won't
be compatible otherwise. At the same time we need the initial state of
the wallet to test the dump functionality.

Also use redirect_stderr=True to fix failure when run from pull-tester
2018-02-01 11:13:01 +01:00
Alexander Block
a92b7b2ede Add missed change from previous backport to wallet-dump.py
#8840: test: Explicitly set encoding to utf8 when opening text files
2018-02-01 11:13:01 +01:00
MarcoFalke
9bb9e9ea72 Merge #9077: [qa] Increase wallet-dump RPC timeout
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
8d90f295e8 Merge #8442: [qa] Rework hd wallet dump test
fa4439d [qa] Rework hd wallet dump test (MarcoFalke)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
9a37add21f Merge #8417: [QA] Add walletdump RPC test (including HD- & encryption-tests)
54af51d [QA] Add walletdump RPC test (including HD- & encryption-tests) (Jonas Schnelli)
2018-02-01 11:13:01 +01:00