Package org.bitcoinj.core
Class BlockLocator
java.lang.Object
org.bitcoinj.core.BlockLocator
Represents Block Locator in GetBlocks and GetHeaders messages
-
Constructor Summary
ConstructorDescriptionBlockLocator
(com.google.common.collect.ImmutableList<Sha256Hash> hashes) Creates a Block locator with defined list of hashes. -
Method Summary
Modifier and TypeMethodDescriptionadd
(Sha256Hash hash) Add aSha256Hash
to a newly created block locator.boolean
get
(int i) Get hash by index from this block locator.Returns List of Block locator hashes.int
hashCode()
int
size()
Returns the number of hashes in this block locator.toString()
-
Constructor Details
-
BlockLocator
public BlockLocator() -
BlockLocator
Creates a Block locator with defined list of hashes.
-
-
Method Details
-
add
Add aSha256Hash
to a newly created block locator. -
size
public int size()Returns the number of hashes in this block locator. -
getHashes
Returns List of Block locator hashes. -
get
Get hash by index from this block locator. -
toString
-
hashCode
public int hashCode() -
equals
-