* Protocol Doc - correct type of DSQ nTime and fReady fields
* Basic typo correction
* RPC help typos
- Change port in DisconnectNode example from Bitcoin port -> Dash port
- Correct order of chainwork in getblockheader/getblockheaders help to
match actual output
- Add missing fields to getmininginfo/getblocktemplate help output
* Remove duplicate generate field in getmininginfo output
* Fix generate field type info / description in getmininginfo output
This monstrous change eliminates all remaining uses of
g_connman global variable in Dash-specific code.
Unlike previous changes eliminating g_connman use
that were isolated to particular modules, this one covers
multiple modules simultaneously because they are so interdependent
that change in one module was quickly spreading to others.
This is mostly invariant change that was done by
* changing all functions using g_connman to use connman argument,
* changing all functions calling these functions to use connman argument,
* repeating previous step until there's nothing to change.
After multiple iterations, this process converged to final result,
producing code that is mostly equivalent to original one, but passing
CConnman instance through arguments instead of global variable.
The only exception to equivalence of resulting code is that I had to
create overload of CMasternodeMan::CheckAndRemove() method without arguments
that does nothing just for use in CFlatDB<CMasternodeMan>::Dump() and
CFlatDB<CMasternodeMan>::Load() methods.
Normal CMasternodeMan::CheckAndRemove() overload now has argument of
CConnman& type and is used everywhere else.
The normal overload has this code in the beginning:
if(!masternodeSync.IsMasternodeListSynced()) return;
Masternode list is not synced yet when we load "mncache.dat" file,
and we save "mncache.dat" file on shutdown, so I presume that it's OK
to use overload that does nothing in both cases.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
* Store masternodes in a map instead of a vector, drop unused functions in CMasternodeMan
* CTxIn vin -> COutPoint outpoint
* do not use CMasternodeMan::Find outside of the class
* update GetMasternodeInfo
* safe version of GetNextMasternodeInQueueForPayment
* fix ProcessMasternodeConnections
* bump CMasternodeMan::SERIALIZATION_VERSION_STRING
* process governance objects in CheckMasternodeOrphanObjects as usual
* code refactoring: SetRateChecksHelper class added
* fixed race condition issues with propagation of governance objects
* change GetCollateralConfirmations signature
* code refactoring
* reduced minimum number of collateral confirmations required for relaying proposals
* bug fixes and improvements
* 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
* On gov sync first sync objs, then ask for votes on per-obj basis from different peers.
This should help to sync obj list initially and split the load among many peers. Also adds ability to catch up votes later after the sync.
* ask for all objects, do this in cycles
* Fix Sync() code, better readability
* ask multiple nodes at once when possible, perf boost for large numper of objs
* Addressed comments: pass reference, more peer version check
- some were not used, some were included twice, some were in the wrong place, some were missing (but it compiled because some were in the wrong place)
- organized a bit better, grouped dash specific includes in original bitcoin files, should save some time solving conflicts when/if merging patches later
* Change rate check logic to avoid DoS attacks
* Convert rate check to use object timestamp instead of arrival time
* Update cached variables before checking for superblocks
* Ensure that last times are monotonically non-decreasing
* Bump governance manager serialization format
* Improved rate check error reporting
* Increase quorum for object deletion to 2/3 of MN network
* Implement expiration of watchdog objects
* Remove objects from the watchdog map itself
* Message fix for invalid objects