]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Update C++ bindings demo with new struct naming
authorMatt Corallo <git@bluematt.me>
Fri, 19 Feb 2021 21:09:04 +0000 (16:09 -0500)
committerMatt Corallo <git@bluematt.me>
Sat, 20 Feb 2021 15:06:22 +0000 (10:06 -0500)
lightning-c-bindings/demo.cpp

index d514946e214ff3dfaf60193a90cc08508db6fc37..84f27448a33f76259f064105e627d8ec2c7e558a 100644 (file)
@@ -363,9 +363,9 @@ int main() {
                LDK::PeerManager net1 = PeerManager_new(std::move(msg_handler1), node_secret1, &random_bytes.data, logger1);
 
                // Demo getting a channel key and check that its returning real pubkeys:
-               LDK::ChannelKeys chan_keys1 = keys_source1->get_channel_keys(keys_source1->this_arg, false, 42);
-               chan_keys1->set_pubkeys(&chan_keys1); // Make sure pubkeys is defined
-               LDKPublicKey payment_point = ChannelPublicKeys_get_payment_point(&chan_keys1->pubkeys);
+               LDK::Sign chan_signer1 = keys_source1->get_channel_signer(keys_source1->this_arg, false, 42);
+               chan_signer1->set_pubkeys(&chan_signer1); // Make sure pubkeys is defined
+               LDKPublicKey payment_point = ChannelPublicKeys_get_payment_point(&chan_signer1->pubkeys);
                assert(memcmp(&payment_point, &null_pk, sizeof(null_pk)));
 
                // Instantiate classes for node 2:
@@ -634,5 +634,5 @@ int main() {
        memset(&sk, 42, 32);
        LDKThirtyTwoBytes kdiv_params;
        memset(&kdiv_params, 43, 32);
-       LDK::InMemoryChannelKeys keys = InMemoryChannelKeys_new(sk, sk, sk, sk, sk, random_bytes, 42, kdiv_params);
+       LDK::InMemorySigner signer = InMemorySigner_new(sk, sk, sk, sk, sk, random_bytes, 42, kdiv_params);
 }