|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.core.Message
com.google.bitcoin.core.FilteredBlock
public class FilteredBlock
A FilteredBlock is used to relay a block with its transactions filtered using a BloomFilter. It consists
of the block header and a PartialMerkleTree which contains the transactions which matched the filter.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.bitcoin.core.Message |
|---|
Message.LazyParseException |
| Field Summary | |
|---|---|
static int |
MIN_PROTOCOL_VERSION
The protocol version at which Bloom filtering started to be supported. |
| Fields inherited from class com.google.bitcoin.core.Message |
|---|
bytes, checksum, cursor, length, MAX_SIZE, offset, params, parsed, parseLazy, parseRetain, protocolVersion, recached, UNKNOWN_LENGTH |
| Constructor Summary | |
|---|---|
FilteredBlock(NetworkParameters params,
byte[] payloadBytes)
|
|
| Method Summary | |
|---|---|
void |
bitcoinSerializeToStream(OutputStream stream)
Serializes this message to the provided stream. |
Map<Sha256Hash,Transaction> |
getAssociatedTransactions()
Gets the set of transactions which were provided using provideTransaction() which match in getTransactionHashes() |
Block |
getBlockHeader()
Gets a copy of the block header |
Sha256Hash |
getHash()
Gets the hash of the block represented in this Filtered Block |
int |
getTransactionCount()
Number of transactions in this block, before it was filtered |
List<Sha256Hash> |
getTransactionHashes()
Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block |
protected void |
parseLite()
Perform the most minimal parse possible to calculate the length of the message. |
boolean |
provideTransaction(Transaction tx)
Provide this FilteredBlock with a transaction which is in its merkle tree |
| Methods inherited from class com.google.bitcoin.core.Message |
|---|
adjustLength, bitcoinSerialize, bitcoinSerialize, ensureParsed, getMessageSize, getParams, isCached, isParsed, isRecached, maybeParse, unCache, unsafeBitcoinSerialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_PROTOCOL_VERSION
| Constructor Detail |
|---|
public FilteredBlock(NetworkParameters params,
byte[] payloadBytes)
throws ProtocolException
ProtocolException| Method Detail |
|---|
public void bitcoinSerializeToStream(OutputStream stream)
throws IOException
Message
IOException
protected void parseLite()
throws ProtocolException
Message
parseLite in class MessageProtocolException
public List<Sha256Hash> getTransactionHashes()
throws VerificationException
ProtocolException - If the partial merkle block is invalid or the merkle root of the partial merkle block doesnt match the block header
VerificationExceptionpublic Block getBlockHeader()
public Sha256Hash getHash()
getHash in class Message
public boolean provideTransaction(Transaction tx)
throws VerificationException
VerificationExceptionpublic Map<Sha256Hash,Transaction> getAssociatedTransactions()
public int getTransactionCount()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||