added check to set the txArrivalWait value to the txGatherSlack value if txArrivalWait < txGatherSlack

This commit is contained in:
Alex 2023-02-09 03:14:38 -08:00
parent b8be0dace8
commit d56370b910

View file

@ -332,6 +332,11 @@ func (f *TxFetcher) Drop(peer string) error {
// Start boots up the announcement based synchroniser, accepting and processing
// hash notifications and block fetches until termination requested.
func (f *TxFetcher) Start() {
// the txArrivalWait duration should not be less than the txGatherSlack duration
if f.txArrivalWait < txGatherSlack {
f.txArrivalWait = txGatherSlack
}
go f.loop()
}