There is a bug AddOrUpdateVote function in CGovernanceManager. If a new vote has been arrived it is checked if a corresponding parent object are present in the mapObjects. If it is not we need to sync the parent object and return false. But the syncing is never performed because the corresponding code is placed after return statement. So we need to sync and then return.
* rpcgovernance improvements
- Modified govject get to return full object data along with vote counts
- Cleaned up vote count reporting code
* Added cached flags to gobject get output
* GetMinCollateralFee should not validate object type, it should be IsValidLocally's job
* Explicitly set 0 fee for known free objects, set fee to MAX_MONEY for unknown one
Followup for the recent winner_block PR (#1028) and name confusion discovered during code review.
"Mostly" because also:
- CMasternodeBlockPayees::GetPayee -> CMasternodeBlockPayees::GetBestPayee which describes what this function is actually doing a bit better imo;
- fixing constructor CMasternodePaymentVote empty constructor
* store vote hashes in CMasternodePayee and use them in CMasternodePayments::Sync
* Request low data payment blocks in batches directly from some node instead of/after preliminary Sync.
* remove nVotes
* Fixes to rpcgovernance.cpp
- Replaced use of non-unique public key with vin in vote-conf, vote-alias and vote-many
- Replaced use of non-threadsafe CmasternodeMan::Find function with Get
- Added LOCK(cs_main) to getgovernanceinfo
* Fixed rpcgovernance.cpp voting error messages
* Implemented several governance changes
- Limit strData size to avoid propagation of very large messages
- Remove unused CGovernanceObject::SetData method
- Remove CGovernanceObject::strName field to avoid data redundancy
* Fixed parameter count bug in gobject prepare
* deprecate start-many
* remove outdated "enforce" rpc and enforceMasternodePaymentsTime
* "count" should lock cs_main and call GetNextMasternodeInQueueForPayment only when needed
* "masternodelist" fixes:
- rename "pubkey" -> payee", fix description
- fix "filter" description
- change "full" format: add lastpaidblock, move IP to the end of string to make it more table-ish
- fix "status" description
- fix "addr" filter, wasn't working
- trivial refactoring
* fix "start-alias" and "create-alias" error message - should be a bit more descriptive now
* rpcmasternode trivial cleanup
- add "spork" debug category
- move "seen" and "unknown" to new "spork" debug category to reduce log spam
- new/updated/seen messages should not overlap