Skip to content

Commit

Permalink
Debug tx queue source account limit test
Browse files Browse the repository at this point in the history
  • Loading branch information
JuI3s committed Aug 10, 2023
1 parent dc6d44c commit 6fa76ff
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/overlay/Peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ void
Peer::sendGetTxSet(uint256 const& setID)
{
ZoneScoped;
CLOG_INFO(Overlay, "Peer {} sends get tx set for hash.", toString());
StellarMessage newMsg;
newMsg.type(GET_TX_SET);
newMsg.txSetHash() = setID;
Expand Down Expand Up @@ -1080,6 +1081,7 @@ Peer::recvDontHave(StellarMessage const& msg)
void
Peer::sendTxSet(TxSetFrameConstPtr txSet)
{

StellarMessage newMsg;
if (txSet->isGeneralizedTxSet())
{
Expand All @@ -1089,6 +1091,11 @@ Peer::sendTxSet(TxSetFrameConstPtr txSet)
// The peer wouldn't be able to accept the generalized tx set,
// but it wouldn't be correct to say we don't have it. So we
// just let the request to timeout.
CLOG_INFO(
Overlay,
"Peer {} has remote overlay version < first version "
"supporting generalized tx set ({}). Return from sendTxSet.",
toString(), Peer::FIRST_VERSION_SUPPORTING_GENERALIZED_TX_SET);
return;
}
newMsg.type(GENERALIZED_TX_SET);
Expand Down Expand Up @@ -1123,6 +1130,12 @@ Peer::recvGetTxSet(StellarMessage const& msg)
// The peer wouldn't be able to accept the generalized tx set,
// but it wouldn't be correct to say we don't have it. So we
// just let the request to timeout.
CLOG_INFO(Overlay,
"Peer {} remote overlay version < first version "
"supporting generalized transaction set {}. Return "
"from recvGetTxSet",
toString(),
Peer::FIRST_VERSION_SUPPORTING_GENERALIZED_TX_SET);
return;
}
newMsg.type(GENERALIZED_TX_SET);
Expand Down Expand Up @@ -1208,6 +1221,8 @@ Peer::recvGeneralizedTxSet(StellarMessage const& msg)
{
ZoneScoped;
auto frame = TxSetFrame::makeFromWire(mApp, msg.generalizedTxSet());
CLOG_INFO(Overlay, "Peer {} receives generalized transaction set {}",
toString(), hexAbbrev(frame->getContentsHash()));
mApp.getHerder().recvTxSet(frame->getContentsHash(), frame);
}

Expand All @@ -1217,6 +1232,10 @@ Peer::recvTransaction(StellarMessage const& msg)
ZoneScoped;
auto transaction = TransactionFrameBase::makeTransactionFromWire(
mApp.getNetworkID(), msg.transaction());

CLOG_INFO(Overlay, "Peer {} receives transaction {}", toString(),
hexAbbrev(transaction->getContentsHash()));

if (transaction)
{
// record that this peer sent us this transaction
Expand Down Expand Up @@ -1860,6 +1879,8 @@ Peer::startAdvertTimer()
void
Peer::sendTxDemand(TxDemandVector&& demands)
{
CLOG_INFO(Overlay, "Peer {} sends demands for {} transaction hashes.",
toString(), demands.size());
if (demands.size() > 0)
{
auto msg = std::make_shared<StellarMessage>();
Expand Down

0 comments on commit 6fa76ff

Please sign in to comment.