3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00

Fix crash in toString() for an unparsed block header object.

This commit is contained in:
Mike Hearn 2013-02-28 18:06:58 +01:00
parent ec1504f9dc
commit f9a57db818

View File

@ -536,7 +536,7 @@ public class Block extends Message {
@Override @Override
public String toString() { public String toString() {
StringBuffer s = new StringBuffer("v" + version + " block: \n" + " previous block: " 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" + " time: [" + time + "] " + new Date(time * 1000).toString() + "\n"
+ " difficulty target (nBits): " + difficultyTarget + "\n" + " nonce: " + nonce + "\n"); + " difficulty target (nBits): " + difficultyTarget + "\n" + " nonce: " + nonce + "\n");
if (transactions != null && transactions.size() > 0) { if (transactions != null && transactions.size() > 0) {