[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / BestBlock.java
index fd0e09c11c943c8c68a8ebc2b6bd4b418cf44397..325b80690e4a2b25056f3d841a1c3d605d1710ca 100644 (file)
@@ -38,6 +38,23 @@ public class BestBlock extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * 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.
+        */
+       public boolean eq(BestBlock b) {
+               boolean ret = bindings.BestBlock_eq(this.ptr, b == null ? 0 : b.ptr);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(b);
+               if (this != null) { this.ptrs_to.add(b); };
+               return ret;
+       }
+
+       @Override public boolean equals(Object o) {
+               if (!(o instanceof BestBlock)) return false;
+               return this.eq((BestBlock)o);
+       }
        /**
         * Constructs a `BestBlock` that represents the genesis block at height 0 of the given
         * network.