Commit Graph

10 Commits

Author SHA1 Message Date
UdjinM6
67def9ef2e Merge #948 Refactor CDarkSendSigner
f0ed400 darkSendSigner.SignMessage() should not return error message

154f1b6 darkSendSigner.VerifyMessage() should return non-localized message, its callers should populate error to debug.log

b130c32 darkSendSigner.GetKeysFromSecret() should not return error message, its callers should handle it
2016-08-19 05:50:04 -06:00
UdjinM6
5a8c0c9b9d Merge #928: Refactor All The Things - part1
86d8505 Refactor CActiveMasternode
+ move strMasterNodeAddr to CActiveMasternode

a005c79 Refactor InstantSend
+ new lock cs_instantsend to protect maps on CleanTransactionLocksList()
+ new DEFAULT_INSTANTSEND_DEPTH constant
+ rename MIN_INSTANTX_PROTO_VERSION to MIN_INSTANTSEND_PROTO_VERSION and bump it

d24182c Refactor Privatesend
+ decouple from util.h and version.h
+ more functions for CDarksendBroadcastTx: constructors, signing, serialization
+ move from rand() to insecure_rand() in general but to GetRand() for session id
+ fix defaults
2016-08-05 21:49:45 +02:00
UdjinM6
17dfbdea1b Merge #924: Fix AddRef() usage
513506f Fixing AddRef() usage
Using AddRef() in ConnectNode() for existing connections doesn't feel right considering how refs are released in ThreadSocketHandler(). I guess this could be the reason that sometimes refs stay >0 no matter what and nodes stuck in vNodesDisconnected forever which means that node never get deleted and FinalizeNode signal is never fired which in its turn means that for example mapBlocksInFlight can't be cleaned properly and then blocks stuck.

This commit should solve the issue by:
- removing AddRef() for existing connections
- adding AddRef() in CNode's constructor using the same conditions as in ThreadSocketHandler()
- addding AddRef() in ConnectNode() and Release() in ThreadSocketHandler() for mixing nodes
- removing explicit calls to Release() (back to `pnode->fDisconnect = true` in `CMasternodeMan::ProcessMasternodeConnections`)

9da4a83 fix names/comments
2016-07-30 13:05:41 +02:00
UdjinM6
8e560080a1 Fix comments, remove ._str() from LogPrintfs, few trivial changes 2016-03-06 18:21:06 +01:00
UdjinM6
5c2a0cc9ec Fix bug that prevented new blocks to update tip during mixing
Closes #706
2016-03-02 12:54:46 +01:00
UdjinM6
ff159ad7e7 ConnectNode/FindNide:
- Use FindNode instead of explicit loops
- Do not use FindNode where we can grab node right from ConnectNode (slightly less cs_vNodes)
2015-08-05 01:38:54 +03:00
UdjinM6
dba572ac96 use specific protocols 2015-07-20 04:54:02 +03:00
UdjinM6
53c3a5e24c Cleanup few debug msgs, reduce log spam / few readability fixes 2015-03-13 18:53:12 +03:00
Evan Duffield
c6f0259d9b fixed shared key usage 2015-03-05 08:08:03 -07:00
Evan Duffield
a6b58ab1e8 Merged masternode blinding 2015-03-04 08:58:36 -07:00