The prior approach to find if there is traffic in a lane was not detecting the transactions properly. It could be due to the CCIPSendRequestedWatcher captures the event after it is initiated not any transaction before that.
Solution
The revised approach is to use the FilterCCIPSendRequested by a past derived block number and see if there is any traffic. The block number is derived by this formula:
filterFromBlock = latestBlockNumber - (SkipRequestIfAnotherRequestTriggeredWithin/avgBlockTime) By this approach, we will be able to find traffic better.
Porting this change from CCIP. PR: https://github.com/smartcontractkit/ccip/pull/1445
Motivation
The prior approach to find if there is traffic in a lane was not detecting the transactions properly. It could be due to the
CCIPSendRequestedWatcher
captures the event after it is initiated not any transaction before that.Solution
The revised approach is to use the FilterCCIPSendRequested by a past derived block number and see if there is any traffic. The block number is derived by this formula:
filterFromBlock = latestBlockNumber - (SkipRequestIfAnotherRequestTriggeredWithin/avgBlockTime)
By this approach, we will be able to find traffic better.https://smartcontract-it.atlassian.net/browse/CCIP-3420
### RequiresResolves