Skip to content

Commit

Permalink
protocol: introduce QSENDRECSIGS net message.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Jan 17, 2022
1 parent 01ba363 commit 1c16a2f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,8 @@ class CNode
std::atomic_bool fPauseRecv;
std::atomic_bool fPauseSend;

// If true, we will announce/send him plain recovered sigs (usually true for full nodes)
std::atomic<bool> m_wants_recsigs{false};
// True when the first message after the verack is received
std::atomic<bool> fFirstMessageReceived{false};
// True only if the first message received after verack is a mnauth
Expand Down
7 changes: 7 additions & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,13 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
pfrom->fDisconnect = true;
}

else if (strCommand == NetMsgType::QSENDRECSIGS) {
bool b;
vRecv >> b;
pfrom->m_wants_recsigs = b;
return true;
}

else if (strCommand == NetMsgType::INV) {
std::vector<CInv> vInv;
vRecv >> vInv;
Expand Down
2 changes: 2 additions & 0 deletions src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const char* FINALBUDGETVOTE = "fbvote";
const char* SYNCSTATUSCOUNT = "ssc";
const char* GETMNLIST = "dseg";
const char* QFCOMMITMENT = "qfcommit";
const char* QSENDRECSIGS="qsendrecsigs";
const char* MNAUTH="mnauth";
}; // namespace NetMsgType

Expand Down Expand Up @@ -105,6 +106,7 @@ const static std::string allNetMessageTypes[] = {
NetMsgType::SYNCSTATUSCOUNT,
NetMsgType::MNBROADCAST2,
NetMsgType::QFCOMMITMENT,
NetMsgType::QSENDRECSIGS,
NetMsgType::MNAUTH
};
const static std::vector<std::string> allNetMessageTypesVec(allNetMessageTypes, allNetMessageTypes + ARRAYLEN(allNetMessageTypes));
Expand Down
4 changes: 4 additions & 0 deletions src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ extern const char* SYNCSTATUSCOUNT;
* The qfcommit message is used to propagate LLMQ final commitments
*/
extern const char* QFCOMMITMENT;
/**
* The qsendrecsigs message is used to propagate LLMQ intra-quorum partial recovered signatures
*/
extern const char* QSENDRECSIGS;
/**
* The mnauth message is used authenticate MN connections
*/
Expand Down

0 comments on commit 1c16a2f

Please sign in to comment.