mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
onchaind: Have onchaind also tell us the scriptPubKey of our outputs
onchaind is in the correct position to tell us about them, so have it pass them up as well. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
neil saitug
parent
df4e0a0022
commit
478e2d7084
@@ -272,11 +272,10 @@ static void onchain_add_utxo(struct channel *channel, const u8 *msg)
|
||||
u->close_info->channel_id = channel->dbid;
|
||||
u->close_info->peer_id = channel->peer->id;
|
||||
u->spendheight = NULL;
|
||||
u->scriptPubkey = NULL;
|
||||
|
||||
if (!fromwire_onchain_add_utxo(msg, &u->txid, &u->outnum,
|
||||
&u->close_info->commitment_point,
|
||||
&u->amount, &blockheight)) {
|
||||
if (!fromwire_onchain_add_utxo(
|
||||
u, msg, &u->txid, &u->outnum, &u->close_info->commitment_point,
|
||||
&u->amount, &blockheight, &u->scriptPubkey)) {
|
||||
fatal("onchaind gave invalid add_utxo message: %s", tal_hex(msg, msg));
|
||||
}
|
||||
u->blockheight = blockheight>0?&blockheight:NULL;
|
||||
|
||||
Reference in New Issue
Block a user