From 700d88dfa45dedde8d863e8a66c2ab0fd4cf874c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 7 Mar 2017 11:28:20 +1030 Subject: [PATCH] lightningd/hsm: sign funding transaction correctly. We read in the localkey twice, leaving us to use an initializwed remote_pubkey. Signed-off-by: Rusty Russell --- lightningd/hsm/hsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightningd/hsm/hsm.c b/lightningd/hsm/hsm.c index 6da64b129..a80f9ebd9 100644 --- a/lightningd/hsm/hsm.c +++ b/lightningd/hsm/hsm.c @@ -370,7 +370,7 @@ static u8 *sign_funding_tx(const tal_t *ctx, const u8 *data) if (!fromwire_hsmctl_sign_funding(tmpctx, data, NULL, &satoshi_out, &change_out, &change_keyindex, &local_pubkey, - &local_pubkey, &inputs)) + &remote_pubkey, &inputs)) status_failed(WIRE_HSMSTATUS_BAD_REQUEST, "Bad SIGN_FUNDING"); tx = bitcoin_tx(tmpctx, tal_count(inputs), 1 + !!change_out);