Block: Print hash in toString().

This commit is contained in:
Andreas Schildbach
2015-11-18 13:54:31 +01:00
parent 9d82642a93
commit bd46eb028c
2 changed files with 2 additions and 1 deletions

View File

@@ -286,7 +286,7 @@ public abstract class AbstractBlockChain {
} catch (BlockStoreException e1) {
throw new RuntimeException(e1);
}
throw new VerificationException("Could not verify block " + block.getHashAsString() + "\n" +
throw new VerificationException("Could not verify block:\n" +
block.toString(), e);
}
}

View File

@@ -592,6 +592,7 @@ public class Block extends Message {
public String toString() {
StringBuilder s = new StringBuilder();
s.append(" block: \n");
s.append(" hash: ").append(getHashAsString());
s.append(" version: ").append(version);
String bips = Joiner.on(", ").skipNulls().join(isBIP34() ? "BIP34" : null, isBIP66() ? "BIP66" : null,
isBIP65() ? "BIP65" : null);