Package org.ldk.structs
Class BestBlock
- java.lang.Object
-
- org.ldk.structs.BestBlock
-
public class BestBlock extends Object
The best known block as identified by its hash and height.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
block_hash()
Returns the best block hash.BestBlock
clone()
Creates a copy of the BestBlockprotected void
finalize()
static BestBlock
from_genesis(Network network)
Constructs a `BestBlock` that represents the genesis block at height 0 of the given network.int
height()
Returns the best block height.static BestBlock
of(byte[] block_hash, int height)
Returns a `BestBlock` as identified by the given block hash and height.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
from_genesis
public static BestBlock from_genesis(Network network)
Constructs a `BestBlock` that represents the genesis block at height 0 of the given network.
-
of
public static BestBlock of(byte[] block_hash, int height)
Returns a `BestBlock` as identified by the given block hash and height.
-
block_hash
public byte[] block_hash()
Returns the best block hash.
-
height
public int height()
Returns the best block height.
-
-