X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FBolt11InvoiceFeatures.cs;h=7b649b24cb78b48035faf3c7b088c74a0e847012;hb=3d1f246d05172683acd3b81836de4e4e9f0c1afd;hp=b1e77cc44f480685e04c74e93e9e431713093f7a;hpb=a32b8843c44637ebd82c83390d17db573b972153;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs b/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs index b1e77cc4..7b649b24 100644 --- a/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs +++ b/c_sharp/src/org/ldk/structs/Bolt11InvoiceFeatures.cs @@ -50,6 +50,18 @@ public class Bolt11InvoiceFeatures : CommonBase { return ret_hu_conv; } + /** + * Generates a non-cryptographic 64-bit hash of the Bolt11InvoiceFeatures. + */ + public long hash() { + long ret = bindings.Bolt11InvoiceFeatures_hash(this.ptr); + GC.KeepAlive(this); + return ret; + } + + public override int GetHashCode() { + return (int)this.hash(); + } /** * Create a blank Features with no features set */