onchaind: tell wallet when we see our revoked commitment tx to_remote output

Without this, the wallet won't know how to spend it.

Fixes: #1738
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-07-26 16:57:26 +09:30 committed by Christian Decker
parent 8869204730
commit ae8b459932

View File

@ -1832,6 +1832,14 @@ static void handle_their_cheat(const struct bitcoin_tx *tx,
OUTPUT_TO_US, NULL, NULL, NULL);
ignore_output(out);
script[LOCAL] = NULL;
/* Tell the master that it will want to add
* this UTXO to its outputs */
wire_sync_write(REQ_FD, towire_onchain_add_utxo(
tmpctx, txid, i,
remote_per_commitment_point,
tx->output[i].amount,
tx_blockheight));
continue;
}
if (script[REMOTE]