From: Matt Corallo Date: Sat, 7 Aug 2021 21:08:34 +0000 (+0000) Subject: Revert "Update C++ demo to new upstream changes" X-Git-Tag: v0.0.99.3~3 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=27420b741988915b87183351bf3da22779eff5c2;p=ldk-c-bindings Revert "Update C++ demo to new upstream changes" This reverts commit 8edfba2587ed38175f8627d770f501131c12dada. --- diff --git a/lightning-c-bindings/demo.cpp b/lightning-c-bindings/demo.cpp index 7c6dfda..1d8b9ec 100644 --- a/lightning-c-bindings/demo.cpp +++ b/lightning-c-bindings/demo.cpp @@ -637,11 +637,9 @@ int main() { assert(queue.events.size() == 1); assert(queue.events[0]->tag == LDKEvent_PaymentReceived); assert(!memcmp(queue.events[0]->payment_received.payment_hash.data, payment_hash.data, 32)); - assert(queue.events[0]->payment_received.purpose.tag == LDKPaymentPurpose_InvoicePayment); - assert(!memcmp(queue.events[0]->payment_received.purpose.invoice_payment.payment_secret.data, - Invoice_payment_secret(invoice->contents.result).data, 32)); + assert(!memcmp(queue.events[0]->payment_received.payment_secret.data, Invoice_payment_secret(invoice->contents.result).data, 32)); assert(queue.events[0]->payment_received.amt == 5000); - memcpy(payment_preimage.data, queue.events[0]->payment_received.purpose.invoice_payment.payment_preimage.data, 32); + memcpy(payment_preimage.data, queue.events[0]->payment_received.payment_preimage.data, 32); assert(ChannelManager_claim_funds(&cm2, payment_preimage)); } PeerManager_process_events(&net2);