forked from Qortal/qortal
Fix for NPE when serialized block bytes are unavailable.
This commit is contained in:
parent
b103c5b13f
commit
7ab17383a6
@ -174,6 +174,9 @@ public class BlockArchiveReader {
|
|||||||
Integer height = this.fetchHeightForSignature(signature, repository);
|
Integer height = this.fetchHeightForSignature(signature, repository);
|
||||||
if (height != null) {
|
if (height != null) {
|
||||||
byte[] blockBytes = this.fetchSerializedBlockBytesForHeight(height);
|
byte[] blockBytes = this.fetchSerializedBlockBytesForHeight(height);
|
||||||
|
if (blockBytes == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// When responding to a peer with a BLOCK message, we must prefix the byte array with the block height
|
// When responding to a peer with a BLOCK message, we must prefix the byte array with the block height
|
||||||
// This mimics the toData() method in BlockMessage and CachedBlockMessage
|
// This mimics the toData() method in BlockMessage and CachedBlockMessage
|
||||||
|
Loading…
Reference in New Issue
Block a user