Commit Graph

14891 Commits

Author SHA1 Message Date
UdjinM6
e23f61822d
Make TrafficGraphDataTests more general (#1943) 2018-02-21 19:32:35 +03:00
UdjinM6
43671a39df
Deprecate nMnCount in mnget (#1942) 2018-02-21 19:32:21 +03:00
UdjinM6
5b1c4d8a11
Few (mostly trivial) cleanups and fixes (#1940)
* Drop nBudgetProposalEstablishingTime

* Refactor: replace `== COutPoint()` with `.IsNull()`

* Refactor: add `operator bool()` to CMasternodePing

* Refactor: actually use `operator bool()` for CPendingDsaRequest

* Refactor: fixing code style in TrafficGraphData

* Fix some comments and whitespaces

* Drop CGovernanceVote::GetTypeHash()

* Drop legacy X11 code

No longer used... if it ever was used at all.

* Move `<boost/foreach.hpp>` out of coins.h

* Simplify CMasternodeBlockPayees::GetRequiredPaymentsString()

Also less of boost::lexical_cast

* Drop CTxDSIn::nSentTimes

* Fix few warnings

* fix warning (timer)

* fix nit
2018-02-21 19:32:08 +03:00
thephez
4db8483d4e [Docs] Doxyfile Project version update (#1938) 2018-02-21 19:31:47 +03:00
UdjinM6
99273f63aa
Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (#1937)
* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (gobject)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (gobjvote)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (mnw)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (txlvote)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (dsq)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (dstx)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (spork)

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (mnb)

* Actually care about old signature format in mnp, otherwise we can start banning peers rather quickly

* Use SPORK_6_NEW_SIGS to switch from signing string messages to hashes (mnv)

* Unify sign/verify code a bit by using GetSignatureHash() (even when it matches GetHash())

* fix docs

* address review comments

* fix log output (copy/paste error)

* Replace custom GetSignatureHash/GetHash with serialization (where applicable)

* Convert from/to old format in SerializationOp only for p2p

* fix
2018-02-16 17:54:53 +03:00
UdjinM6
451f7f0710
Fix issues with mnp, mnw and dsq signatures via new spork (SPORK_6_NEW_SIGS) (#1936)
* Use new spork SPORK_6_NEW_SIGS to fix masternode payment vote signature format

* Use SPORK_6_NEW_SIGS to also fix masternode ping signature format

* Use SPORK_6_NEW_SIGS to also fix privatesend queue signature format

* adjust spork6 description in docs

* mnp hashing/signing changed - hash everything and use SignHash/VerifyHash directly instead of constructing a string to sign (both activate via SPORK_6_NEW_SIGS)

* fix

* cleanup
2018-02-15 17:44:22 +03:00
UdjinM6
0480626410
Force masternodes to have listen=1 and maxconnections to be at least DEFAULT_MAX_PEER_CONNECTIONS (#1935) 2018-02-15 17:43:32 +03:00
UdjinM6
aadec37354
Change format of gobject, store/transmit vchData instead of hex-encoded string of a string (#1934)
* Change format of gobject, store/transmit vchData instead of hex-encoded string

* fix (limited string for old format)
2018-02-15 17:43:17 +03:00
UdjinM6
c656133502
Switch masternode id in Dash data structures from CTxIn to COutPoint (#1933)
* Switch masternode id in Dash data structures from CTxIn to COutPoint (including p2p level)

* outpoint -> masternodeOutpoint in DSEG
2018-02-15 10:29:44 +03:00
UdjinM6
0bd8c8e43a
Refactor: vecTxIn -> vecOutPoints for CompactTallyItem (#1932) 2018-02-15 10:29:31 +03:00
gladcow
2ea6f7d82e Use override keyword for overriden class member functions (#1644)
* Use `override` keyword for all overriden functions

* more override
2018-02-15 10:29:15 +03:00
UdjinM6
580c4884c1
Fix trigger execution and expiration (#1920)
* Move trigger expiration logic into CSuperblock and handle executed/non-executed triggers differently

* Actually execute triggers
2018-02-12 21:35:10 +03:00
UdjinM6
ed712eb819
Fix nDelayGetHeadersTime (int64_t max == never delay) (#1916)
* Fix nDelayGetHeadersTime (int64_t max == never delay)

* Rewrite conditions in a more natural way i.e. (now - last_best > threshold)
2018-02-12 21:34:53 +03:00
UdjinM6
f35b5979a7
Refactor CGovernanceManager::Sync (split in two) (#1930) 2018-02-12 15:49:28 +03:00
UdjinM6
b5046d59c5
Dseg fixes (#1929)
* Do not filter non-upgraded mns in DSEG

Reverts #1373, we need non-upgraded MNs to verify their old govvotes

* Split mn list/single vin logic for DSEG

This should prevent looping till the end of the list if we were asked for a single mn and a) we have it but some following `if` has failed or b) we don't have it. It also should be a bit easier to follow the logic this way.
2018-02-12 15:49:15 +03:00
UdjinM6
d5ef77ba99
Refactor: use constant refs and Ret suffix (#1928)
* Refactor function params from `std::string` to `const std::string&`

* Refactor more function params to use const references
2018-02-12 15:49:00 +03:00
UdjinM6
3f0c8723e9
Slightly refactor AutoBackupWallet (#1927)
- make incoming strWalletFile a const reference, do not modify it directly inside the function
- follow `false false ... false true` principle
2018-02-12 15:48:48 +03:00
UdjinM6
2e04864b26
Replace boost::lexical_cast<int> with atoi (#1926)
Also cleanup existing atoi-s in Dash code
2018-02-12 15:48:35 +03:00
UdjinM6
0f4d963baf
Add DSHA256 and X11 benchmarks, refactor names of other algo benchmarks to group them together (#1925)
DSHA256 and X11 also have additional tests for data from 32 to 2048 bytes (for comparison, in steps)
2018-02-12 15:48:20 +03:00
UdjinM6
4528c735f4
Replace some instantsend/privatesend magic numbers with constants (#1924) 2018-02-12 15:48:09 +03:00
UdjinM6
d7f55d5083
Switch nTimeLastSuccessfulStep from GetTimeMillis() to GetTime() (#1923)
This makes PS mockable. And we don't need that much of a precision here anyway.
2018-02-12 15:47:53 +03:00
UdjinM6
204b1fe997
Drop unnecessary AcceptToMemoryPool in PS (and corresponding cs-main locks), just relay what we have (#1922) 2018-02-12 15:47:35 +03:00
UdjinM6
271c249e15
Skip next mn payments winners when selecting a MN to mix on (#1921) 2018-02-12 15:47:20 +03:00
UdjinM6
0670695fea
Move prev/next sb height logic from rpc to CSuperblock::GetNearestSuperblocksHeights (#1919) 2018-02-12 15:46:55 +03:00
UdjinM6
312088b560
Fix connectivity check in CActiveMasternode::ManageStateInitial (#1918) 2018-02-12 15:46:38 +03:00
UdjinM6
741fcbc902
Remove excessive custom validation in CProposalValidator::ValidatePaymentAddress (#1917) 2018-02-12 15:46:27 +03:00
Nathan Marley
354aac8d1c rename nEpochStart variable and adjust comments (#1915)
* rename nEpochStart variable and adjust comments

* rename GetBlockStart() -> GetBlockHeight()

* change var name to nBlockHeight
2018-02-12 15:46:01 +03:00
Nathan Marley
8ea1bd0f55 remove unused method GetObjectSubtype (#1914)
I believe this was stubbed to eventually read the string in the 1st
field of the inner array in the gobject JSON. Currently only Sentinel
uses this and I would like to move to just a single JSON object, so
don't think this is necessary any longer.
2018-02-12 15:45:38 +03:00
UdjinM6
6825b347f2
Merge pull request #1911 from codablock/pr_backports_from_cmptblk
Backports from compact block related Bitcoin PRs
2018-02-09 13:08:03 +03:00
Wladimir J. van der Laan
4ac4e96e8f Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
2018-02-08 11:18:48 +01:00
Alexander Block
662ec024ab Make peer id logging consistent ("peer=%d" instead of "peer %d") 2018-02-08 11:18:48 +01:00
Matt Corallo
592d8f0734 Use a temp pindex to avoid a const_cast in ProcessNewBlockHeaders 2018-02-08 11:06:22 +01:00
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