Networking fixes related to peer connectivity issues (#384)

This commit is contained in:
Kithmini Gunawardhana
2023-09-23 10:03:45 +05:30
committed by GitHub
parent 6a2384cd03
commit e7e1268a99
23 changed files with 393 additions and 98 deletions

View File

@@ -791,7 +791,12 @@ namespace consensus
{
std::scoped_lock lock(ctx.contract_ctx_mutex);
if (ctx.contract_ctx)
return ctx.contract_ctx->args.npl_messages.try_enqueue(std::move(npl_msg));
{
if (ctx.contract_ctx->args.lcl_id == npl_msg.lcl_id)
return ctx.contract_ctx->args.npl_messages.try_enqueue(std::move(npl_msg));
else
LOG_DEBUG << "Trying to add irrelevant NPL from " << util::to_hex(npl_msg.pubkey) << " | lcl-seq: " << npl_msg.lcl_id.seq_no;
}
return false;
}