Fixed NPE when attempting to lookup a block signature that doesn't exist.

This commit is contained in:
CalDescent 2021-09-27 09:13:19 +01:00
parent 656896d16f
commit 114833cf8e

View File

@ -126,7 +126,7 @@ public class BlockArchiveReader {
// Lookup the height for the requested signature // Lookup the height for the requested signature
try { try {
BlockArchiveData archivedBlock = repository.getBlockArchiveRepository().getBlockArchiveDataForSignature(signature); BlockArchiveData archivedBlock = repository.getBlockArchiveRepository().getBlockArchiveDataForSignature(signature);
if (archivedBlock.getHeight() == null) { if (archivedBlock == null) {
return null; return null;
} }
return archivedBlock.getHeight(); return archivedBlock.getHeight();