com.google.bitcoin.core
Class StoredUndoableBlock

java.lang.Object
  extended by com.google.bitcoin.core.StoredUndoableBlock
All Implemented Interfaces:
Serializable

public class StoredUndoableBlock
extends Object
implements Serializable

Contains minimal data neccessary 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.

See Also:
Serialized Form

Constructor Summary
StoredUndoableBlock(Sha256Hash hash, List<Transaction> transactions)
           
StoredUndoableBlock(Sha256Hash hash, TransactionOutputChanges txOutChanges)
           
 
Method Summary
 boolean equals(Object o)
           
 Sha256Hash getHash()
          Get the hash of the represented block
 List<Transaction> getTransactions()
          Get the full list of transactions if it is stored, otherwise null.
 TransactionOutputChanges getTxOutChanges()
          Get the transaction output changes if they have been calculated, otherwise null.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StoredUndoableBlock

public StoredUndoableBlock(Sha256Hash hash,
                           TransactionOutputChanges txOutChanges)

StoredUndoableBlock

public StoredUndoableBlock(Sha256Hash hash,
                           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 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:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All rights reserved.