mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-27 02:26:44 +00:00
keep block hash
This commit is contained in:
parent
728b6ce5ef
commit
75701c725d
1 changed files with 10 additions and 0 deletions
|
@ -7,16 +7,26 @@ import java.util.Date;
|
||||||
|
|
||||||
public class BlockTransaction extends BlockTransactionHash implements Comparable<BlockTransaction> {
|
public class BlockTransaction extends BlockTransactionHash implements Comparable<BlockTransaction> {
|
||||||
private final Transaction transaction;
|
private final Transaction transaction;
|
||||||
|
private final Sha256Hash blockHash;
|
||||||
|
|
||||||
public BlockTransaction(Sha256Hash hash, int height, Date date, Long fee, Transaction transaction) {
|
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);
|
super(hash, height, date, fee);
|
||||||
this.transaction = transaction;
|
this.transaction = transaction;
|
||||||
|
this.blockHash = blockHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Transaction getTransaction() {
|
public Transaction getTransaction() {
|
||||||
return transaction;
|
return transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Sha256Hash getBlockHash() {
|
||||||
|
return blockHash;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(BlockTransaction blockchainTransaction) {
|
public int compareTo(BlockTransaction blockchainTransaction) {
|
||||||
return super.compareTo(blockchainTransaction);
|
return super.compareTo(blockchainTransaction);
|
||||||
|
|
Loading…
Reference in a new issue