X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FAcceptChannel.cs;h=ffa4cfa03c8ec4ecf08ff4abe49456431e2a9e2a;hp=78b053475a6a91a049ca238a05ad3a26c4ee1ce9;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hpb=a32b8843c44637ebd82c83390d17db573b972153 diff --git a/c_sharp/src/org/ldk/structs/AcceptChannel.cs b/c_sharp/src/org/ldk/structs/AcceptChannel.cs index 78b05347..ffa4cfa0 100644 --- a/c_sharp/src/org/ldk/structs/AcceptChannel.cs +++ b/c_sharp/src/org/ldk/structs/AcceptChannel.cs @@ -390,6 +390,18 @@ public class AcceptChannel : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the AcceptChannel. + */ + public long hash() { + long ret = bindings.AcceptChannel_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two AcceptChannels contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields.