Correct length of block header when hashing at an offset

This commit is contained in:
Ross Nicoll
2015-10-18 14:03:11 +01:00
committed by Andreas Schildbach
parent 000564923f
commit 922a013142

View File

@@ -191,7 +191,7 @@ public class Block extends Message {
difficultyTarget = readUint32();
nonce = readUint32();
hash = Sha256Hash.wrapReversed(Sha256Hash.hashTwice(payload, offset, cursor));
hash = Sha256Hash.wrapReversed(Sha256Hash.hashTwice(payload, offset, cursor - offset));
headerParsed = true;
headerBytesValid = parseRetain;