* trivial governance cleanup:
- spaces
- names
- no "using namespace std;"
- few log and rpc messages adjusted
- remove unused
- use defined types
- move few members to private
* fixing after code review
* consistent JSON return value for failed vote
* make JSON output for voting results consistent
* result should be either 'success' or 'failed'
* error message belongs in 'errorMessage' field
* Wallet passphrase lock fixes:
- wallet should not allow cli commands to bypass lock validation
- wallet should lock again in mixing mode if it was unlocked for mixing and next unlock (e.g. for sending funds) happened
- removed AnonymizeOnlyUnlocked status, it's never going to be reached anymore
- "For anonymization only" checkbox:
- should be available only when user click "Start Mixing"
- should be set on by default when available
- adjusted title
- adjust error messages in walletpassphrase for unlocked wallets
* Add comment about IsLocked() usage
* Final safety check for locked wallet in WalletModel::prepareTransaction
* Added more specific error message about attempts to submit superblocks by
non-masternodes
* Fixed governance object validation bug
* Fixed logic bug in governance object submission
* Decouple min mnw versions from version.h, drop MIN_MNW_PEER_PROTO_VERSION in fav of GetMinMasternodePaymentsProto()
* Split min protocol validation for new and old winners in IsValid
* Improved exception handling
- Removed attempts to catch exceptions in intermediate helper function calls
- Made helper functions for JSON parsing private
* Governance voting fixes
- Converted voting defines to enums for better type safety
- Enabled gobject voteraw rpc command
- Removed unused parameter from gobject getvotes rpc command
* Fixed help message for gobject get
* Improved encapsulation of CGovernanceVote objects
- CGovernanceVote data members are now private
- Necessary to ensure that enum values are used for signals and outcomes since data members remain int's for compatibility with serialiation code
* Removed unused cs_budget mutex (has been replaced with governance.cs)
* Fix code review issues
- Restored early return in ConvertVoteSignal
- Removed special case for "none" string to make clear that NONE is
for invalid strings
- Removed commented defines (informational comments preserved)
* Fixed code review issues
- Fixed error messages for vote-conf, vote-alias and voteraw
- Removed voteraw from gobject command list and help messages because
it is actually a top-level command
- Fixed parameter indices for voteraw
* Bug fixes for the governance rpc interface
- Allow use of the gobject getvotes command
- Fix order of arguments to CGovernanceVote constructor
* Added getvotes to gobject help message and fixed parameter name in the
error/usage message.
* Implemented different fees for different types of governance objects
* Added fee amounts to object returned by getgovernanceinfo
* Implement new requireents for Superblock creation
- Superblocks creation requires a valid masternode signature
- Superblock creation no longer requires a collateral fee
- Superblock creation rate is limited to roughly 1 per masternode per cycle
* Fixed getgovernanceinfo help message
* Removed old governance fee constant
* Fixed bug in IsSignatureValid and added debugging code
* Fixed parent hash variable index and added debugging code
* Modified GetBudgetSystemCollateralTX to take fee amount parameter
* Changes due to code review comments
- Naming changes
- Removed confusing comment
As a client, submit part of a future mixing transaction to a Masternode to start the process (SubmitDenominate):
step 1: prepare denominated inputs and outputs (PrepareDenominate, code moved from wallet.cpp, slightly refactored)
step 2: send denominated inputs and outputs (SendDenominate, slightly refactored)
- rename all 3 instantsend sporks
- remove SPORK_7_MASTERNODE_SCANNING (not used anymore)
- change `_DEFAULT` for spork 2 and 3, adjust comments for for them
- fix GetSporkNameByID() (should not return smth_DEFAULT)
6debbe6 Refactor CDarkSendEntry
- make it serializable, use constructor, pass objects of CDarkSendEntry type to functions (instead of separate variables
da406e3 Masternode sync improvements
- add simple helpers for few more sync states (use them where appropriate instead of old code + rpc output)
- use new helpers to avoid meaningless message processing
- actually fail if sync shouldn't continue due to lack of info, make sure Reset is used to quit failed state
* Improve JSON error reporting in CGovernanceObject::LoadData
* Changed JSON parsing to match current version of sentinel which now sends
correct JSON integers instead of quoting them as strings
* Changes for getblocktemplate, CreateNewBlock, FillBlockPayee, CreateSuperblock:
- Add support for superblocks in getblocktemplate (+fix miner reward - it was missing)
- Refactor the way masternode payments are passed around, change getblocktemplate format for them too.