]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fixed comment on weight_received_htlc
authorKen Sedgwick <ken@bonsai.com>
Thu, 13 Jan 2022 02:29:05 +0000 (18:29 -0800)
committerKen Sedgwick <ken@bonsai.com>
Thu, 13 Jan 2022 23:01:32 +0000 (15:01 -0800)
lightning/src/chain/package.rs

index 13d0e939056297b9920b808e9d935985db39ef84..1cc63a8c8605338875a4ac3c7a95fab7b365d794 100644 (file)
@@ -62,7 +62,7 @@ pub(crate) fn weight_offered_htlc(opt_anchors: bool) -> u64 {
 }
 
 pub(crate) fn weight_received_htlc(opt_anchors: bool) -> u64 {
-       // number_of_witness_elements + sig_length + revocation_sig + pubkey_length + revocationpubkey + witness_script_length + witness_script
+       // number_of_witness_elements + sig_length + counterpartyhtlc_sig + empty_vec_length + empty_vec + witness_script_length + witness_script
        const WEIGHT_RECEIVED_HTLC: u64 = 1 + 1 + 73 + 1 + 1 + 1 + 139;
        const WEIGHT_RECEIVED_HTLC_ANCHORS: u64 = WEIGHT_RECEIVED_HTLC + 3; // + OP_1 + OP_CSV + OP_DROP
        if opt_anchors { WEIGHT_RECEIVED_HTLC_ANCHORS } else { WEIGHT_RECEIVED_HTLC }