X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FRawInvoice.java;h=107e6c0e1d9bd54221c727945ac5233875827909;hb=76982ad5233afc2759d085bb243f33149369ab9b;hp=fea24f2d06055789d69bd1d605c166ecd2aca399;hpb=227672ae3d27961f63d45913aad01dbae1f53e99;p=ldk-java diff --git a/src/main/java/org/ldk/structs/RawInvoice.java b/src/main/java/org/ldk/structs/RawInvoice.java index fea24f2d..107e6c0e 100644 --- a/src/main/java/org/ldk/structs/RawInvoice.java +++ b/src/main/java/org/ldk/structs/RawInvoice.java @@ -82,10 +82,22 @@ public class RawInvoice extends CommonBase { } /** - * Calculate the hash of the encoded `RawInvoice` + * Checks if two RawInvoices contain equal inner contents. + */ + public long hash() { + long ret = bindings.RawInvoice_hash(this.ptr); + Reference.reachabilityFence(this); + return ret; + } + + @Override public int hashCode() { + return (int)this.hash(); + } + /** + * Calculate the hash of the encoded `RawInvoice` which should be signed. */ - public byte[] hash() { - byte[] ret = bindings.RawInvoice_hash(this.ptr); + public byte[] signable_hash() { + byte[] ret = bindings.RawInvoice_signable_hash(this.ptr); Reference.reachabilityFence(this); return ret; }