mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-11 17:55:53 +00:00
Fix potential headers-first NPE race
This commit is contained in:
parent
b0b8eb28d3
commit
3398216449
@ -157,6 +157,10 @@ public class BitcoindComparisonTool {
|
||||
return null;
|
||||
} else if (m instanceof GetHeadersMessage) {
|
||||
try {
|
||||
if (currentBlock.block == null) {
|
||||
log.info("Got a request for a header before we had even begun processing blocks!");
|
||||
return null;
|
||||
}
|
||||
LinkedList<Block> headers = new LinkedList<Block>();
|
||||
Block it = blockList.hashHeaderMap.get(currentBlock.block.getHash());
|
||||
while (it != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user