From f9a57db8181f3eb978231c2099b32ad928b69ff4 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 28 Feb 2013 18:06:58 +0100 Subject: [PATCH] Fix crash in toString() for an unparsed block header object. --- core/src/main/java/com/google/bitcoin/core/Block.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/google/bitcoin/core/Block.java b/core/src/main/java/com/google/bitcoin/core/Block.java index d6f1eafd..24374af2 100644 --- a/core/src/main/java/com/google/bitcoin/core/Block.java +++ b/core/src/main/java/com/google/bitcoin/core/Block.java @@ -536,7 +536,7 @@ public class Block extends Message { @Override public String toString() { StringBuffer s = new StringBuffer("v" + version + " block: \n" + " previous block: " - + prevBlockHash.toString() + "\n" + " merkle root: " + getMerkleRoot().toString() + "\n" + + getPrevBlockHash().toString() + "\n" + " merkle root: " + getMerkleRoot().toString() + "\n" + " time: [" + time + "] " + new Date(time * 1000).toString() + "\n" + " difficulty target (nBits): " + difficultyTarget + "\n" + " nonce: " + nonce + "\n"); if (transactions != null && transactions.size() > 0) {