[bisq-network/bisq] Request blocks in case we have not received it (#2730)
Manfred Karrer
notifications at github.com
Wed Apr 17 19:09:28 UTC 2019
ManfredKarrer commented on this pull request.
> + if (!daoStateService.isParseBlockChainComplete())
+ return;
+
+ if (checkForBlockReceivedTimer != null) {
+ // In case we received a new block before out timer gets called we stop the old timer
+ checkForBlockReceivedTimer.stop();
+ }
+
+ // We expect to receive the new BSQ block from the network shortly after BitcoinJ has been aware of it.
+ // If we don't receive it we request it manually from seed nodes
+ checkForBlockReceivedTimer = UserThread.runAfter(() -> {
+ if (daoStateService.getChainHeight() < height) {
+ log.warn("We did not receive a block from the network {} seconds after we saw the new block in BicoinJ. " +
+ "We request from our seed nodes missing blocks from block height {}.",
+ CHECK_FOR_BLOCK_RECEIVED_DELAY_SEC, daoStateService.getChainHeight());
+ liteNodeNetworkService.requestBlocks(daoStateService.getChainHeight());
I think you are right, thanks! Will look into it again after I finish current new PR...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2730#discussion_r276392118
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190417/a824ed8b/attachment.html>
More information about the bisq-github
mailing list