]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Update C bindings demos for new KeysManager API 2021-02-789-bindings
authorMatt Corallo <git@bluematt.me>
Fri, 19 Feb 2021 01:33:41 +0000 (20:33 -0500)
committerMatt Corallo <git@bluematt.me>
Fri, 19 Feb 2021 19:02:46 +0000 (14:02 -0500)
lightning-c-bindings/demo.c
lightning-c-bindings/demo.cpp

index 0f8bd102a48189be60b5156a686297a54fd2ac60..3f7c4be9d2fe2b9307d51173f15702c995a5949e 100644 (file)
@@ -68,7 +68,7 @@ int main() {
                .free = NULL,
        };
 
-       LDKKeysManager keys = KeysManager_new(&node_seed, net, 0, 0);
+       LDKKeysManager keys = KeysManager_new(&node_seed, 0, 0);
        LDKKeysInterface keys_source = KeysManager_as_KeysInterface(&keys);
 
        LDKUserConfig config = UserConfig_default();
index 32c8d605c119bbafb2a0137644a6de5f9b0bae39..d514946e214ff3dfaf60193a90cc08508db6fc37 100644 (file)
@@ -348,7 +348,7 @@ int main() {
                // Instantiate classes for node 1:
                uint8_t node_seed[32];
                memset(&node_seed, 0, 32);
-               LDK::KeysManager keys1 = KeysManager_new(&node_seed, network, 0, 0);
+               LDK::KeysManager keys1 = KeysManager_new(&node_seed, 0, 0);
                LDK::KeysInterface keys_source1 = KeysManager_as_KeysInterface(&keys1);
                node_secret1 = keys_source1->get_node_secret(keys_source1->this_arg);
 
@@ -370,7 +370,7 @@ int main() {
 
                // Instantiate classes for node 2:
                memset(&node_seed, 1, 32);
-               LDK::KeysManager keys2 = KeysManager_new(&node_seed, network, 0, 0);
+               LDK::KeysManager keys2 = KeysManager_new(&node_seed, 0, 0);
                LDK::KeysInterface keys_source2 = KeysManager_as_KeysInterface(&keys2);
                node_secret2 = keys_source2->get_node_secret(keys_source2->this_arg);
 
@@ -567,7 +567,7 @@ int main() {
        mons_list1->data[0].is_owned = false; // XXX: God this sucks
        uint8_t node_seed[32];
        memset(&node_seed, 0, 32);
-       LDK::KeysManager keys1 = KeysManager_new(&node_seed, network, 1, 0);
+       LDK::KeysManager keys1 = KeysManager_new(&node_seed, 1, 0);
        LDK::KeysInterface keys_source1 = KeysManager_as_KeysInterface(&keys1);
 
        LDK::ChannelManagerReadArgs cm1_args = ChannelManagerReadArgs_new(KeysManager_as_KeysInterface(&keys1), fee_est, mon1, broadcast, logger1, UserConfig_default(), std::move(mons_list1));
@@ -581,7 +581,7 @@ int main() {
        mons_list2->data[0] = *& std::get<1>(mons2.mons[0]); // Note that we need a reference, thus need a raw clone here, which *& does.
        mons_list2->data[0].is_owned = false; // XXX: God this sucks
        memset(&node_seed, 1, 32);
-       LDK::KeysManager keys2 = KeysManager_new(&node_seed, network, 1, 0);
+       LDK::KeysManager keys2 = KeysManager_new(&node_seed, 1, 0);
 
        LDK::ChannelManagerReadArgs cm2_args = ChannelManagerReadArgs_new(KeysManager_as_KeysInterface(&keys2), fee_est, mon2, broadcast, logger2, UserConfig_default(), std::move(mons_list2));
        LDK::CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ cm2_read =