mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
748d91dd7a
2 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
dustinface
|
5176a26007
|
masternode|net|rpc: Improve masternode sync process (#3690)
* masternode: Replace sync states INITIAL and WAITING with BLOCKCHAIN * masternode: Peer dependent "assume tip" timeout I would say its enough to only wait 1 tick if we have more than 3 peers before we move over to governance sync. * masternode: Notify the UI instantly if switched to governance sync Without this it takes one iteration more for the UI to receive the update. * masternode: Notify the UI about CMasternodeSync::Reset calls * masternode: Don't instantly reset the sync process Give it MASTERNODE_SYNC_RESET_SECONDS (600) seconds time after the last UpdateBlockTip call. * rpc: Don't switch to next asset in "mnsync reset" * rpc: Force the reset in "mnsync reset" * net: Make sure the sync gets a reset if required after network changes This will reset the sync process if its outdated in the following cases: - If the connections dropped to zero - If the connections went from zero to one - If the network has been enabled or disabled * Apply suggestions from code review Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> * net: Only open masternode connections if the blockchain is synced In general it doesn't make sense to connect to masternodes before due to MNAUTH requires blockchain sync. This could lead to failing quorum connections/failing masternode probing.. if a just restarted node/a out of sync node would hit a dkg block.. Then they would not try to open those llmq/probing connections for the next 60s (nLLMQConnectionRetryTimeout). Thats basically what happens in tests right now and they fail without this commit. * test: Make sure nodes are synced when they get restored after isolation Their sync might be out of date otherwise due to bigger mocktime bumps Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> |
||
PastaPastaPasta
|
b07a7b810c
|
Backport 11796 + 11774 (#3612)
* Merge #11796: [tests] Functional test naming convention |