diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/BlockTransaction.java b/src/main/java/com/sparrowwallet/drongo/wallet/BlockTransaction.java index da102bf..1074583 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/BlockTransaction.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/BlockTransaction.java @@ -7,16 +7,26 @@ import java.util.Date; public class BlockTransaction extends BlockTransactionHash implements Comparable { private final Transaction transaction; + private final Sha256Hash blockHash; public BlockTransaction(Sha256Hash hash, int height, Date date, Long fee, Transaction transaction) { + this(hash, height, date, fee, transaction, null); + } + + public BlockTransaction(Sha256Hash hash, int height, Date date, Long fee, Transaction transaction, Sha256Hash blockHash) { super(hash, height, date, fee); this.transaction = transaction; + this.blockHash = blockHash; } public Transaction getTransaction() { return transaction; } + public Sha256Hash getBlockHash() { + return blockHash; + } + @Override public int compareTo(BlockTransaction blockchainTransaction) { return super.compareTo(blockchainTransaction);