Fix error when using Block.verify() after the Block constructor

...which takes all the elements of the block as paramters.
This commit is contained in:
Matt Corallo 2014-08-11 15:26:11 -07:00
parent 5220fb5141
commit 20447bc340

View File

@ -239,7 +239,7 @@ public class Block extends Message {
maybeParseTransactions(); maybeParseTransactions();
if (optimalEncodingMessageSize != 0) if (optimalEncodingMessageSize != 0)
return optimalEncodingMessageSize; return optimalEncodingMessageSize;
optimalEncodingMessageSize = getMessageSize(); optimalEncodingMessageSize = bitcoinSerialize().length;
return optimalEncodingMessageSize; return optimalEncodingMessageSize;
} }