X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FCommitmentUpdate.cs;h=d14ed22ad6896fffe6bca6cec107be7eed646124;hb=dbcef74f9feb03aa6d8d0ee07854740cac926f6b;hp=9ec94107ae401945da7677bc326f42c1fd692c5d;hpb=8de7213fbf663ff60322896282dad51e8ab2f001;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs b/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs index 9ec94107..d14ed22a 100644 --- a/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs +++ b/c_sharp/src/org/ldk/structs/CommitmentUpdate.cs @@ -223,6 +223,18 @@ public class CommitmentUpdate : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the CommitmentUpdate. + */ + public long hash() { + long ret = bindings.CommitmentUpdate_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Checks if two CommitmentUpdates contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields.