lightningd/commit_tx: don't segv on NULL htlcmap.

We don't care if we're just checking sigs, so allow NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-02-24 16:22:56 +10:30
parent 5d0977df3a
commit a737335da2
2 changed files with 15 additions and 8 deletions

View File

@@ -51,7 +51,7 @@ u64 commit_tx_base_fee(u64 feerate_per_kw, size_t num_untrimmed_htlcs);
* @self_pay_msat: amount to pay directly to self
* @other_pay_msat: amount to pay directly to the other side
* @htlcs: tal_arr of htlcs committed by transaction (some may be trimmed)
* @htlc_map: outputed map of outnum->HTLC (NULL for direct outputs).
* @htlc_map: outputed map of outnum->HTLC (NULL for direct outputs), or NULL.
* @obscured_commitment_number: number to encode in commitment transaction
* @side: side to generate commitment transaction for.
*