* Add "enough data" stop conditions for gov sync
* fix:
- make sure condition is checked only once per tick
- let condition be fully used on resync (reset nTimeNoObjectsLeft)
* fix verification network behaviour:
- use up to 10 connections only
- save state (do not ask same nodes after restart)
- initiate on time based intervals (every 5 minutes), based not on new blocks (should keep connections alive longer)
* revert mWeAskedForVerification serialization
* send verify requests using MAX_POSE_CONNECTIONS as a step
* fix watchdogs:
- do not accept if CreationTime is out of bounds (using CreationTime, not local time now)
- do not sync expired
- fix disk serialization
* drop watchdogs early, avoid adding//removing
* clean mapWatchdogObjects when object is deleted via votes
* Few networking fixes:
- skip "masternode"/inbound connections for sync related processes
- do not sync gov data to other nodes until fully synced ourselves
- do not accept incoming connections until fully synced
* inbound connections could be harmful only if our node is a masternode
* same for CGovernanceManager::Sync
* Update for OpenSSL 1.1 API.
* Update qt/paymentrequestplus.cpp for OpenSSL 1.1 API.
* Fix missing # in if for qt/paymentrequestplus.cpp fix for OpenSSL 1.1 API change.
* Fix indentation in src/qt/paymentrequestplus.cpp.
* Fix crash on initial mixing step:
- skip nodes marked to be disconnected
- add/release ref to make sure pnode is not deleted in the middle of the process
* - fix copy/paste mistake (nTries)
- let ConnectNode manage ref for non-mn pnodeFound
* Add last ping time to masternode_info_t
* Use thread safe functions to access mnodeman in masternodelist.cpp
* Fix masternodelist widget locking
* Protect access to widget data from StartAlias button
- vote should be removed when corresponding orphan vote expires
- fix CInstantSend::SyncTransaction: mapTxLockVotes is indexed by vote hash, not by tx hash (use votes from candidates and from orhpan vote map to avoid looping through the whole vote map)
* Adjust gov sync:
- simulate mainnet gov obj sync conditions on testnet
- add redundancy: ask up to 3 peers for the same obj
* stop loop if max number of peers per obj was asked
* protect mapRejectedBlocks by cs_main
* few block reprocessing fixes:
- DisconnectBlock should fail on DisconnectTip failure
- ResolveConflicts should fail on DisconnectBlock failure
- ReprocessBlocks cleanup
* don't ban on IsBlockValueValid/IsBlockPayeeValid failure
* Multi-quorum InstantSend, complete refactoring
+ cleanup for IS and partial protobump
* more changes:
- allow InstantSend tx to have 10 inputs max
- store many unique tx hashes in mapVotedOutpoints
- more checks in AcceptToMemoryPoolWorker (moved from ProcessMessage + CTxLockRequest(tx).IsValid() )
* More changes:
- let multiple lock candidates compete for votes
- fail to vote on the same outpoint twice early
* More changes:
- notify CInstantSend on UpdatedBlockTip -> remove cs_main from CheckAndRemove()
- notify CInstantSend on SyncTransaction -> count expiration block starting from the block corresponding tx was confirmed instead of the block lock candidate/vote was created
- fixed few locks
* add comments about nConfirmedHeight
* Fix "Block vs Lock" edge case
* Fix "Block vs Lock" edge case, p2
* Fix issues:
- fix logic for locking inputs and notifying - see UpdateLockedTransaction, TryToFinalizeLockCandidate
- add missing hash inserting in ProcessTxLockVote
- add nMaxBlocks param to ResolveConflicts to limit max depth allowed to disconnect blocks recursively
- fix false positive mempool conflict
- add missing mutex locks
- fix fRequireUnspent logic in CTxLockRequest::IsValid