]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Update demo.cpp for new tuple code
authorMatt Corallo <git@bluematt.me>
Thu, 8 Oct 2020 23:36:51 +0000 (19:36 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 21 Oct 2020 18:54:51 +0000 (14:54 -0400)
lightning-c-bindings/demo.cpp

index acb73a4de9c4a181447ed0549e4f177d4023dbed..ee1cedf17a12021adfb583425e306198a29568e1 100644 (file)
@@ -550,9 +550,7 @@ int main() {
        LDKSecretKey sk;
        memset(&sk, 42, 32);
        LDKC2Tuple_u64u64Z kdiv_params;
-       kdiv_params.a = (uint64_t*) malloc(8);
-       kdiv_params.b = (uint64_t*) malloc(8);
-       *kdiv_params.a = 42;
-       *kdiv_params.b = 42;
+       kdiv_params.a = 42;
+       kdiv_params.b = 42;
        LDK::InMemoryChannelKeys keys = InMemoryChannelKeys_new(sk, sk, sk, sk, sk, random_bytes, 42, kdiv_params);
 }