mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Add more Private Send minimum protocol version checking (#1073)
This commit is contained in:
parent
d5dcf2b668
commit
27c445a891
@ -1564,7 +1564,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
|
||||
nLastTimeChanged = GetTimeMillis();
|
||||
// connect to Masternode and submit the queue request
|
||||
CNode* pnode = ConnectNode((CAddress)addr, NULL, true);
|
||||
if(pnode != NULL) {
|
||||
if(pnode != NULL && pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION) {
|
||||
pSubmittedToMasternode = pmn;
|
||||
nSessionDenom = dsq.nDenom;
|
||||
|
||||
@ -1605,7 +1605,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun)
|
||||
nLastTimeChanged = GetTimeMillis();
|
||||
LogPrintf("CDarksendPool::DoAutomaticDenominating -- attempt %d connection to Masternode %s\n", nTries, pmn->addr.ToString());
|
||||
CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true);
|
||||
if(pnode != NULL) {
|
||||
if(pnode != NULL && pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION) {
|
||||
LogPrintf("CDarksendPool::DoAutomaticDenominating -- connected %s\n", pmn->vin.ToString());
|
||||
pSubmittedToMasternode = pmn;
|
||||
|
||||
@ -2326,6 +2326,7 @@ bool CDarksendQueue::Relay()
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
if(pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION)
|
||||
pnode->PushMessage(NetMsgType::DSQUEUE, (*this));
|
||||
|
||||
return true;
|
||||
@ -2365,6 +2366,7 @@ void CDarksendPool::RelayFinalTransaction(const CTransaction& txFinal)
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
if(pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION)
|
||||
pnode->PushMessage(NetMsgType::DSFINALTX, nSessionID, txFinal);
|
||||
}
|
||||
|
||||
@ -2383,6 +2385,7 @@ void CDarksendPool::RelayStatus(int nErrorID)
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
if(pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION)
|
||||
pnode->PushMessage(NetMsgType::DSSTATUSUPDATE, nSessionID, nState, nEntriesCount, nAcceptedEntriesCount, nErrorID);
|
||||
}
|
||||
|
||||
@ -2390,6 +2393,7 @@ void CDarksendPool::RelayCompletedTransaction(bool fError, int nErrorID)
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes)
|
||||
if(pnode->nVersion >= MIN_PRIVATESEND_PEER_PROTO_VERSION)
|
||||
pnode->PushMessage(NetMsgType::DSCOMPLETE, nSessionID, fError, nErrorID);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user