Skip to content

Commit

Permalink
Bump proto version and only send LLMQ related messages to v14 nodes (#…
Browse files Browse the repository at this point in the history
…2780)

* Bump PROTOCOL_VERSION to 70214

* Introduce LLMQS_PROTO_VERSION to avoid relaying to old nodes
  • Loading branch information
codablock committed Mar 20, 2019
1 parent c360237 commit 591b018
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/llmq/quorums_chainlocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void CChainLocksHandler::ProcessNewChainLock(NodeId from, const llmq::CChainLock
bestChainLock = clsig;

CInv inv(MSG_CLSIG, hash);
g_connman->RelayInv(inv);
g_connman->RelayInv(inv, LLMQS_PROTO_VERSION);

auto blockIt = mapBlockIndex.find(clsig.blockHash);
if (blockIt == mapBlockIndex.end()) {
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_instantsend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ void CInstantSendManager::ProcessInstantSendLock(NodeId from, const uint256& has
}

CInv inv(MSG_ISLOCK, hash);
g_connman->RelayInv(inv);
g_connman->RelayInv(inv, LLMQS_PROTO_VERSION);

RemoveMempoolConflictsForLock(hash, islock);
RetryLockTxs(islock.txid);
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/quorums_signing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ void CSigningManager::ProcessRecoveredSig(NodeId nodeId, const CRecoveredSig& re
}

CInv inv(MSG_QUORUM_RECOVERED_SIG, recoveredSig.GetHash());
g_connman->RelayInv(inv);
g_connman->RelayInv(inv, LLMQS_PROTO_VERSION);

for (auto& l : listeners) {
l->HandleNewRecoveredSig(recoveredSig);
Expand Down
5 changes: 4 additions & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/


static const int PROTOCOL_VERSION = 70213;
static const int PROTOCOL_VERSION = 70214;

//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
Expand Down Expand Up @@ -47,4 +47,7 @@ static const int SHORT_IDS_BLOCKS_VERSION = 70209;
//! introduction of DIP3/deterministic masternodes
static const int DMN_PROTO_VERSION = 70213;

//! introduction of LLMQs
static const int LLMQS_PROTO_VERSION = 70214;

#endif // BITCOIN_VERSION_H

0 comments on commit 591b018

Please sign in to comment.