Commit Graph

14790 Commits

Author SHA1 Message Date
UdjinM6
2c04504f1c
Refactor IS votes processing (#1951)
Also make sure orphans are actually processed
2018-02-25 08:33:40 +03:00
UdjinM6
89380b4c92
Drop watchdogs, replace them with sentinel pings (#1949)
* Drop watchdogs, replace them with sentinel pings

* Address review comments

* revert `()`
2018-02-25 08:33:27 +03:00
UdjinM6
ef9a9f2d67
Fix unlocking error on "Start Mixing" (#1941)
* Fix unlocking error on "Start Mixing"

Instead warn that wallet is fully unlocked etc.

* Revert "Fix unlocking error on "Start Mixing""

This reverts commit 4951e58f66.

* Drop mixingOnlyCheckBox and determine the correct unlock path automatically via provided mode
2018-02-22 12:00:50 +03:00
UdjinM6
0153c4c5e8
Merge pull request #1948 from UdjinM6/removeusingnamespacestd
Remove `using namespace std`
2018-02-22 10:41:52 +03:00
thephez
151152b98b rpc - Update getaddednodeinfo help to remove dummy argument (#1947) 2018-02-22 10:41:08 +03:00
UdjinM6
a4b313fd3d Fix std in DBG macro 2018-02-21 23:24:28 +03:00
UdjinM6
6a6e4cdc1b Remove remaining using namespace std 2018-02-21 22:32:13 +03:00
Wladimir J. van der Laan
08b5c69eff Merge #9643: [refactor] Remove using namespace <xxx> from wallet/ & util*
a57845c Refactor: Remove using namespace <xxx> from util* (Karl-Johan Alm)
8a52281 Refactor: Remove using namespace <xxx> from wallet/ (Karl-Johan Alm)

Tree-SHA512: cd06b569fee0ce25db753ade5ee694b582733a8883bfd62a27613020266d2a902af079ef23b58a5412f7af4afd7681e689af3c7780e5ea00c77b16d144d72db5
2018-02-21 22:32:13 +03:00
Wladimir J. van der Laan
ccca7af09e Merge #9476: [refactor] Remove using namespace <xxx> from rpc/ & script/ sources
8cbfc4e Refactor: Remove using namespace <xxx> from script/ (Karl-Johan Alm)
f3c264e Refactor: Remove using namespace <xxx> from rpc/ (Karl-Johan Alm)

Tree-SHA512: 407e80eeda0b8e1df22c5fcba33572e117542fde83c67357f6c2d98fa60bcc7b21bb88ad9a1ee59062fbec17fadaa4836b69e8e6d18188b4027b794357634467
2018-02-21 22:32:13 +03:00
UdjinM6
e71cb3861d
Store CGovernanceVote hash in memory instead of recalculating it via GetHash() every time (#1946)
* Store CGovernanceVote hash in memory instead of recalculating it via GetHash() every time

* Rename GetVoteDataStream to SerializeVoteToStream
2018-02-21 19:35:37 +03:00
Alexander Block
0abd1894ee Call CheckMnbAndUpdateMasternodeList when starting MN (#1945)
* Call CheckMnbAndUpdateMasternodeList when when starting MN

Otherwise the invoking node won't have nCollateralMinConfBlockHash
updated correctly, resulting in the MN showing up in the wrong position
when masternode ranks are calculated.

* Remove UpdateMasternodeList and remaining uses of it
2018-02-21 19:32:51 +03:00
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