File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
nodecore-spv/src/main/java/org/veriblock/spv Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,7 @@ enum class DownloadStatus {
1010
1111 fun isDownloading (): Boolean =
1212 DOWNLOADING == this
13+
14+ fun isReady (): Boolean =
15+ READY == this
1316}
Original file line number Diff line number Diff line change @@ -367,7 +367,8 @@ class PeerEventListener(
367367 // TODO(warchant): if allBlocksAccepted == false here, block can not be connected or invalid
368368 // maybe ban peer? for now, do nothing
369369
370- // download full block bodies to manage mempool
370+ // download full block bodies to manage mempool. Skip if SPV is not synchronized
371+ if (! spvContext.spvService.getDownloadStatus().downloadStatus.isReady()) return
371372 try {
372373 val blocksToRequest = ArrayList <BlockRequest >()
373374
You can’t perform that action at this time.
0 commit comments