Package org.bitcoinj.core
Class StoredUndoableBlock
- java.lang.Object
-
- org.bitcoinj.core.StoredUndoableBlock
-
public class StoredUndoableBlock extends java.lang.ObjectContains minimal data necessary to disconnect/connect the transactions in the stored block at will. Can either store the full set of transactions (if the inputs for the block have not been tested to work) or the set of transaction outputs created/destroyed when the block is connected.
-
-
Constructor Summary
Constructors Constructor Description StoredUndoableBlock(Sha256Hash hash, java.util.List<Transaction> transactions)StoredUndoableBlock(Sha256Hash hash, TransactionOutputChanges txOutChanges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Sha256HashgetHash()Get the hash of the represented blockjava.util.List<Transaction>getTransactions()Get the full list of transactions if it is stored, otherwise null.TransactionOutputChangesgetTxOutChanges()Get the transaction output changes if they have been calculated, otherwise null.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
StoredUndoableBlock
public StoredUndoableBlock(Sha256Hash hash, TransactionOutputChanges txOutChanges)
-
StoredUndoableBlock
public StoredUndoableBlock(Sha256Hash hash, java.util.List<Transaction> transactions)
-
-
Method Detail
-
getTxOutChanges
public TransactionOutputChanges getTxOutChanges()
Get the transaction output changes if they have been calculated, otherwise null. Only one of this and getTransactions() will return a non-null value.
-
getTransactions
public java.util.List<Transaction> getTransactions()
Get the full list of transactions if it is stored, otherwise null. Only one of this and getTxOutChanges() will return a non-null value.
-
getHash
public Sha256Hash getHash()
Get the hash of the represented block
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-