Commit Graph

13313 Commits

Author SHA1 Message Date
Tim Flynn
3e8c0062a0 Implement SPORK_14_REQUIRE_SENTINEL (#1163) 2016-11-23 19:30:36 +04:00
Nathan Marley
ec59862506 Implement getcurrentvotes JSONRPC call (#1164) 2016-11-22 23:26:36 +04:00
UdjinM6
9c4e019c36 bump proto (#1162)
70202 -> 70203
2016-11-22 19:14:28 +04:00
UdjinM6
470239bbc5 Fix IS: (#1161)
- TXLOCKREQUEST should be processed as normal tx plus some custom logic, should not "fake" inventory
- should not create "fake" local lock, should instead keep track of orphan votes and reprocess them when corresponding TXLOCKREQUEST arrives
- orphan vote time map should be indexed by full outpoint, not by txid of mn collateral

bump MIN_INSTANTSEND_PROTO_VERSION
2016-11-22 18:54:26 +04:00
UdjinM6
e84f393571 more info in getpoolinfo rpc, privatesend rpc should only do actions (#1154) 2016-11-22 00:40:56 +04:00
UdjinM6
785adad57e Slightly refactor/fix IS (#1153)
* slightly refactor IS:
- the only place where logic is changed: `ProcessTxLockVote()` - it should first try to find mn and fail if none was found and only then try to call `GetMasternodeRank()` (which is heavy)
- fixed few `cs_main`
- slightly optimized number of `tx.GetHash()` calls
- lots of `const` (fixed few related functions in main.cpp)
- few smaller fixes: iterators, log output, comments, etc
- use thread safe methods of mnodeman
- safety check in GetAverageUnknownVoteTime
2016-11-22 00:40:32 +04:00
UdjinM6
9162c56419 Refactor HelpMessageDialog to reuse it for PS help info, add PS info to help menu (#1144) 2016-11-20 10:54:33 +04:00
UdjinM6
c2ec99ba8e thread safe rand (#1157)
* thread safe InsecureRand class

* remove GetInsecureRand, use GetRandInt for performance non-critical parts
2016-11-20 10:52:45 +04:00
UdjinM6
e121829e40 few trivial fixes in init.cpp (#1155)
* few trivial fixes in init.cpp

* DEFAULT_PRIVATESEND_LIQUIDITY

* fix InitParameterInteraction
2016-11-20 10:52:23 +04:00
Tim Flynn
e59bee8114 Masternode syncing changes (#1149)
* Modified DSEG to send mnb regardless of state

* Removed unused function

* Deactivate rate check when processing masternode orphan objects
2016-11-18 18:17:22 +04:00
Tim Flynn
90bd7cb62b Implemented delay for governance object deletion (#1151) 2016-11-18 18:17:00 +04:00
Spencer Lievens
efa36242a3 Remove duplicated include of governance.h (#1152) 2016-11-18 18:16:30 +04:00
Spencer Lievens
73568be5a3 Remove Duplicated Include for darksend.h (#1150) 2016-11-18 00:39:08 +04:00
UdjinM6
ce88ab3144 Refactor IS - rename only (+related log messages) (#1146) 2016-11-17 04:31:35 +04:00
UdjinM6
7a005a911e Merge pull request #1142 from crowning-/patch-1
[UI] TrayIcon + TrayIconMenu for OSX
2016-11-17 02:52:20 +04:00
UdjinM6
79af6fddea Merge pull request #1145 from tgflynn/v0.12.1.x-mn-startup-fix
Exit if cache files can't be read
2016-11-17 02:49:19 +04:00
UdjinM6
0991a78cfc Merge pull request #1147 from tgflynn/v0.12.1.x-mn-orphan-fix
Fix CheckMasternodeOrphanObjects iterator
2016-11-17 02:46:35 +04:00
Tim Flynn
112986edab Fix CheckMasternodeOrphanObjects so that iterator is incremented once per passage through the loop block 2016-11-16 17:28:10 -05:00
crowning-
9071136c9b [UI] TrayIcon + TrayIconMenu for OSX (review changes) 2016-11-16 22:04:33 +01:00
crowning-
12691e15d4 [UI] TrayIcon + TrayIconMenu for OSX (review changes) 2016-11-16 22:04:26 +01:00
Tim Flynn
47d09ac2db Exit if cache files can't be read 2016-11-16 10:37:40 -05:00
UdjinM6
5128085240 Merge pull request #1134 from UdjinM6/PSFixes
Yet another PrivateSend refactoring/optimization - core part
2016-11-16 13:07:06 +04:00
UdjinM6
a7dae03bfb Merge pull request #1143 from tgflynn/v0.12.1.x-mnodeman-cleanup
CMasternodeMan cleanup
2016-11-16 12:28:57 +04:00
UdjinM6
426051687d Merge pull request #1141 from tgflynn/v0.12.1.x-gov-mn-sync-fix-pr-2
Masternode syncing fix
2016-11-16 12:28:40 +04:00
Tim Flynn
ad0e3514c2 Added indexMasternodes to CMasternodeMan::Clear() 2016-11-15 21:31:14 -05:00
Tim Flynn
087d3d22df Remove unused CMasternodeMan method and argument 2016-11-15 21:09:37 -05:00
crowning-
544d220819 [UI] TrayIcon + TrayIconMenu for OSX 2016-11-15 23:38:04 +01:00
Tim Flynn
c00fdb524a Added peer id to CGovernanceManager::Sync log message 2016-11-15 08:23:49 -05:00
Tim Flynn
c4c4f1dad7 Ensure governance objects are still valid before relaying 2016-11-14 21:27:05 -05:00
Tim Flynn
6deb3a65a3 Implemented missing masternode handling 2016-11-14 21:13:42 -05:00
Tim Flynn
35a45097ed Added IsValidLocallyMethod overload which returns masternode status flag 2016-11-14 21:13:08 -05:00
Tim Flynn
a3277ea422 Set error string for unparseable objects 2016-11-14 21:12:55 -05:00
UdjinM6
714f9a4f0d Fix PR1135 bugs (#1140)
* Move vote relaying into ProcessVote so that local votes are relayed

* Change signature of Insert method to return indication of whether insertion succeeded

* Only process orphan votes once

* Fix function name in log messages
2016-11-15 01:14:58 +04:00
Tim Flynn
aaf96c9a00 Fix function name in log messages 2016-11-14 15:28:46 -05:00
Tim Flynn
31370decd7 Changed log message handling due to code review suggestion 2016-11-14 15:26:53 -05:00
Tim Flynn
d167772643 Only process orphan votes once 2016-11-14 13:22:50 -05:00
Tim Flynn
08e977efe5 Change signature of Insert method to return indication of whether insertion succeeded 2016-11-14 13:17:42 -05:00
Tim Flynn
fd1327031b Moved vote relaying into ProcessVote so that local votes are relayed 2016-11-14 13:07:11 -05:00
Tim Flynn
c31ba8ba4c New vote tallying implementation (#1135) 2016-11-13 21:52:34 +04:00
Tim Flynn
82ca5fdbb8 CGovernanceManager initialization fix (#1138)
* Fix CGovernanceManager initialization problem

* Added logging messages for cases where CGovernanceManager receives a message while not synced

* Prevent potential NULL pointer dereference
2016-11-12 15:14:50 +04:00
UdjinM6
4b4921d8ce reset pSubmittedToMasternode in SetNull() 2016-11-11 11:29:13 +03:00
UdjinM6
643798b5a9 rename UpdatePoolStateOnClient to CheckPoolStateUpdate 2016-11-11 11:28:35 +03:00
UdjinM6
d2f1fd253c Fix exit codes (#1127)
* Fix exit codes:
- `--help`, `--version` etc should exit with `0` i.e. no error ("not enough args" case should still trigger an error)
- error reading config file should exit with error
- slightly refactor AppInitRPC/AppInitRawTx to return standard exit codes (EXIT_FAILURE/EXIT_SUCCESS) or CONTINUE_EXECUTION (-1)
- every main()/exit() should return/use one of EXIT_ codes instead of magic numbers
2016-11-11 09:16:39 +04:00
UdjinM6
6695a43b4a rename nLastTimeChanged to nTimeLastSuccessfulStep, set state before updating nTimeLastSuccessfulStep 2016-11-10 01:49:57 +03:00
UdjinM6
9908ca7c05 PS changes:
Refactoring:
- IsDenomCompatibleWithSession, split in 3 - CreateNewSession, AddUserToExistingSession and IsAcceptableDenomAndCollateral
- CheckTimeout:
    - should not rely on CDarkSendEntry nTimeAdded to clear entries, instead should rely on time of the last successful step i.e. nLastTimeChanged
    - nLastTimeChanged should only be set when mixing moved forward in some way

State related:
- local pool should be in POOL_STATE_IDLE initially
- local pool should switch to POOL_STATE_QUEUE when connected to mn
- local pool should set session id only when in POOL_STATE_QUEUE
- SetState should set state local only, no relaying
- mixing wallets should rely on local logic and expected set of state switches rather then updates from masternodes
- deprecate STATUS_SET_STATE, POOL_STATE_UNKNOWN, POOL_STATE_TRANSMISSION, POOL_STATE_FINALIZE_TRANSACTION

Session related:
- deprecate fSessionFoundMasternode, use nSessionID instead
- deprecate nSessionUsers, use vecSessionCollaterals.size() instead

Other:
- deprecate IsNull()
- move few things to private
- remove deprecated
- bump min ps peer proto
2016-11-09 01:56:27 +03:00
crowning-
f21c7cc9d8 [Build] Re-include Windows/wine test into Travis build (#1137) 2016-11-09 02:53:52 +04:00
crowning-
b11cc8f1a8 [Build] fix travis.yml (#1133) 2016-11-08 01:00:31 +04:00
UdjinM6
fef8752cd0 remove excessive bool arg in dscomplete (#1124) 2016-11-07 03:27:51 +04:00
UdjinM6
f2d2b25130 dsq fixes: (#1128)
- make sure dsq is not too much in the future
- do not process seen dsq
- do not alter nTime for dsq localy, use memory only fTried instead
2016-11-07 03:27:26 +04:00
UdjinM6
eca1e8a4f1 few small fixes: (#1125)
- fail to process dsa when session is already ready
- fail to process dsvin if session is not ready yet
- fail to process any message on the wrong side (mn/client)
- fail in PrepareDenominate if pool already has entries
- fail if can't sign anything in final tx, also reset local pool in such case
- fix "number of entries" pushed on DSSTATUSUPDATE
2016-11-07 03:27:10 +04:00