Commit d50fec5e authored by Ashot's avatar Ashot
Browse files

Broadcast locked transactions

parent 7cb06024
Showing with 20 additions and 0 deletions
+20 -0
......@@ -160,6 +160,17 @@ void InstantSend::ProcessMessage(CNode* pfrom, const std::string& strCommand, CD
return;
}
else if (strCommand == "txllist") //Get InstantX Locked list
{
std::map<uint256, CConsensusVote>::const_iterator it = m_txLockVote.begin();
for (; it != m_txLockVote.end(); ++it)
{
CInv inv(MSG_TXLOCK_VOTE, it->second.GetHash());
pfrom->AddInventoryKnown(inv);
RelayInv(inv);
}
}
}
bool InstantSend::IsIxTxValid(const CTransaction& txCollateral) const
......
......@@ -467,6 +467,11 @@ void CNode::CloseSocketDisconnect()
vRecvMsg.clear();
}
void CNode::PushTxLockedList()
{
PushMessage("txllist");
}
void CNode::PushVersion()
{
int nBestHeight = g_signals.GetHeight().get_value_or(0);
......@@ -2069,7 +2074,10 @@ CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fIn
// Be shy and don't send version until we hear
if (hSocket != INVALID_SOCKET && !fInbound)
{
PushVersion();
PushTxLockedList();
}
GetNodeSignals().InitializeNode(GetId(), this);
}
......
......@@ -422,6 +422,7 @@ public:
void EndMessage() UNLOCK_FUNCTION(cs_vSend);
void PushVersion();
void PushTxLockedList();
void PushMessage(const char* pszCommand)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment