Remove executing block callbacks if node is in IBD (#5193)

This commit is contained in:
Chris Stewart 2023-08-12 19:19:13 -05:00 committed by GitHub
parent 998c997ac5
commit e423de01e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,10 +377,10 @@ case class DataMessageHandler(
handleDataPayload(payload = headersMessage,
peerData = peerData)
} else {
appConfig.callBacks
.executeOnBlockHeadersReceivedCallbacks(
Vector(block.blockHeader))
.map(_ => this)
//else ignore it until we are done with ibd
logger.info(
s"Received block=${block.blockHeader.hashBE.hex} while in IBD, ignoring it until IBD complete state=${state}.")
Future.successful(this)
}
}
} yield {