Package org.bitcoinj.core
Class BlockLocator
java.lang.Object
org.bitcoinj.core.BlockLocator
Represents Block Locator in GetBlocks and GetHeaders messages
-
Constructor Summary
ConstructorsConstructorDescriptionBlockLocator(com.google.common.collect.ImmutableList<Sha256Hash> hashes) Creates a Block locator with defined list of hashes. -
Method Summary
Modifier and TypeMethodDescriptionadd(Sha256Hash hash) Add aSha256Hashto a newly created block locator.booleanget(int i) Get hash by index from this block locator.Returns List of Block locator hashes.inthashCode()intsize()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 aSha256Hashto 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
-