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:
parent
ec1504f9dc
commit
f9a57db818
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user