Skip to content

Commit

Permalink
wallet: Remember scriptpubkey that we pass to onchaind on init
Browse files Browse the repository at this point in the history
This is the scriptpubkey that onchaind spends all funds to, except for
the their_unilateral/to-us case, so we better recognize that address.

Signed-off-by: Christian Decker <[email protected]>
  • Loading branch information
cdecker committed Jan 8, 2018
1 parent 5f29a21 commit 8b6ab6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lightningd/peer_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ static enum watch_result funding_spent(struct peer *peer,
tal_free(tmpctx);
return DELETE_WATCH;
}
txfilter_add_scriptpubkey(peer->ld->owned_txfilter, scriptpubkey);

if (!bip32_pubkey(peer->ld->wallet->bip32_base, &ourkey, keyindex)) {
peer_internal_error(peer,
Expand Down

0 comments on commit 8b6ab6a

Please sign in to comment.