bitcoin: rename confusing functions.

1. anchor_to_remote_redeem => bitcoin_wscript_to_remote_anchored,
   which matches other witness script producing functions and makes
   it clear that it's a to_remote variant.
2. is_anchor_witness_script => is_to_remote_anchored_witness_script
   makes it clear that it's about a to_remote output (as altered
   when anchors are enabled) not an anchor output!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-04-10 09:45:56 +09:30
parent 57b2cbcb32
commit 2fb942d21c
10 changed files with 27 additions and 27 deletions

View File

@@ -247,7 +247,7 @@ struct bitcoin_tx *initial_commit_tx(const tal_t *ctx,
amount = amount_msat_to_sat_round_down(other_pay);
if (option_anchor_outputs) {
redeem = anchor_to_remote_redeem(tmpctx,
redeem = bitcoin_wscript_to_remote_anchored(tmpctx,
&keyset->other_payment_key,
(!side) == lessor ? csv_lock : 1);
scriptpubkey = scriptpubkey_p2wsh(tmpctx, redeem);