Skip to content

Commit

Permalink
Change the scope of the log
Browse files Browse the repository at this point in the history
Signed-off-by: Dongri Jin <[email protected]>
  • Loading branch information
dongrie committed Oct 26, 2023
1 parent 5ab8667 commit 9661a8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/naive-strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ func (st *NaiveStrategy) UnrelayedPackets(src, dst *ProvableChain, sh SyncHeader
return nil, err
}

defer logger.TimeTrack(now, "UnrelayedPackets", "num_src", len(srcPackets), "num_dst", len(dstPackets))

if err := st.updateBacklogMetrics(context.TODO(), src, dst, srcPackets, dstPackets); err != nil {
return nil, err
}
Expand Down Expand Up @@ -173,6 +171,8 @@ func (st *NaiveStrategy) UnrelayedPackets(src, dst *ProvableChain, sh SyncHeader
}
}

defer logger.TimeTrack(now, "UnrelayedPackets", "num_src", len(srcPackets), "num_dst", len(dstPackets))

return &RelayPackets{
Src: srcPackets,
Dst: dstPackets,
Expand Down Expand Up @@ -344,8 +344,6 @@ func (st *NaiveStrategy) UnrelayedAcknowledgements(src, dst *ProvableChain, sh S
return nil, err
}

defer logger.TimeTrack(now, "UnrelayedAcknowledgements", "num_src", len(srcAcks), "num_dst", len(dstAcks))

// If includeRelayedButUnfinalized is true, this function should return packets of which AcknowledgePacket is not finalized yet.
// In this case, filtering packets by QueryUnreceivedAcknowledgements is not needed because QueryUnfinalizedRelayAcknowledgements
// has already returned packets that completely match this condition.
Expand Down Expand Up @@ -386,6 +384,8 @@ func (st *NaiveStrategy) UnrelayedAcknowledgements(src, dst *ProvableChain, sh S
}
}

defer logger.TimeTrack(now, "UnrelayedAcknowledgements", "num_src", len(srcAcks), "num_dst", len(dstAcks))

return &RelayPackets{
Src: srcAcks,
Dst: dstAcks,
Expand Down

0 comments on commit 9661a8d

Please sign in to comment.