[C#] Update auto-generated bindings to LDK 0.0.123
[ldk-java] / c_sharp / src / org / ldk / structs / SendError.cs
index c20659b38b661220c6574db77cd1e822b43fcbf1..dc9cad1bac1f5bfa57bf62d665e372f86d5c126e 100644 (file)
@@ -27,7 +27,8 @@ public class SendError : CommonBase {
                        case 5: return new SendError_InvalidMessage(ptr);
                        case 6: return new SendError_BufferFull(ptr);
                        case 7: return new SendError_GetNodeIdFailed(ptr);
-                       case 8: return new SendError_BlindedPathAdvanceFailed(ptr);
+                       case 8: return new SendError_UnresolvedIntroductionNode(ptr);
+                       case 9: return new SendError_BlindedPathAdvanceFailed(ptr);
                        default:
                                throw new ArgumentException("Impossible enum variant");
                }
@@ -79,6 +80,11 @@ public class SendError : CommonBase {
                internal SendError_GetNodeIdFailed(long ptr) : base(null, ptr) {
                }
        }
+       /** A SendError of type UnresolvedIntroductionNode */
+       public class SendError_UnresolvedIntroductionNode : SendError {
+               internal SendError_UnresolvedIntroductionNode(long ptr) : base(null, ptr) {
+               }
+       }
        /** A SendError of type BlindedPathAdvanceFailed */
        public class SendError_BlindedPathAdvanceFailed : SendError {
                internal SendError_BlindedPathAdvanceFailed(long ptr) : base(null, ptr) {
@@ -192,6 +198,17 @@ public class SendError : CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Utility method to constructs a new UnresolvedIntroductionNode-variant SendError
+        */
+       public static SendError unresolved_introduction_node() {
+               long ret = bindings.SendError_unresolved_introduction_node();
+               if (ret >= 0 && ret <= 4096) { return null; }
+               org.ldk.structs.SendError ret_hu_conv = org.ldk.structs.SendError.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
+               return ret_hu_conv;
+       }
+
        /**
         * Utility method to constructs a new BlindedPathAdvanceFailed-variant SendError
         */
@@ -203,12 +220,24 @@ public class SendError : CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Generates a non-cryptographic 64-bit hash of the SendError.
+        */
+       public long hash() {
+               long ret = bindings.SendError_hash(this.ptr);
+               GC.KeepAlive(this);
+               return ret;
+       }
+
+       public override int GetHashCode() {
+               return (int)this.hash();
+       }
        /**
         * Checks if two SendErrors contain equal inner contents.
         * This ignores pointers and is_owned flags and looks at the values in fields.
         */
        public bool eq(org.ldk.structs.SendError b) {
-               bool ret = bindings.SendError_eq(this.ptr, b == null ? 0 : b.ptr);
+               bool ret = bindings.SendError_eq(this.ptr, b.ptr);
                GC.KeepAlive(this);
                GC.KeepAlive(b);
                return ret;