- public byte[] get_latest_hash() {
- byte[] ret = bindings.ChainParameters_get_latest_hash(this.ptr);
- return ret;
- }
-
- public void set_latest_hash(byte[] val) {
- bindings.ChainParameters_set_latest_hash(this.ptr, val);
- }
-
- public long get_latest_height() {
- long ret = bindings.ChainParameters_get_latest_height(this.ptr);
- return ret;
+ /**
+ * The hash and height of the latest block successfully connected.
+ *
+ * Used to track on-chain channel funding outputs and send payments with reliable timelocks.
+ */
+ public BestBlock get_best_block() {
+ long ret = bindings.ChainParameters_get_best_block(this.ptr);
+ BestBlock ret_hu_conv = new BestBlock(null, ret);
+ ret_hu_conv.ptrs_to.add(this);
+ return ret_hu_conv;