Class BestBlock


  • public class BestBlock
    extends Object
    The best known block as identified by its hash and height.
    • Method Detail

      • clone

        public BestBlock clone()
        Creates a copy of the BestBlock
        Overrides:
        clone in class Object
      • eq

        public boolean eq​(BestBlock b)
        Checks if two BestBlocks contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • from_network

        public static BestBlock from_network​(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.