File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lightning/src/blinded_path Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -156,16 +156,16 @@ pub(super) fn blinded_hops<T: secp256k1::Signing + secp256k1::Verification>(
156156pub ( super ) fn compute_payinfo (
157157 intermediate_nodes : & [ ( PublicKey , ForwardTlvs ) ] , payee_tlvs : & ReceiveTlvs
158158) -> Result < BlindedPayInfo , ( ) > {
159- let mut curr_base_fee: u128 = 0 ;
160- let mut curr_prop_mil: u128 = 0 ;
159+ let mut curr_base_fee: u64 = 0 ;
160+ let mut curr_prop_mil: u64 = 0 ;
161161 let mut cltv_expiry_delta: u16 = 0 ;
162162 for ( _, tlvs) in intermediate_nodes. iter ( ) . rev ( ) {
163163 // In the future, we'll want to take the intersection of all supported features for the
164164 // `BlindedPayInfo`, but there are no features in that context right now.
165165 if tlvs. features . requires_unknown_bits ( ) { return Err ( ( ) ) }
166166
167- let next_base_fee = tlvs. payment_relay . fee_base_msat as u128 ;
168- let next_prop_mil = tlvs. payment_relay . fee_proportional_millionths as u128 ;
167+ let next_base_fee = tlvs. payment_relay . fee_base_msat as u64 ;
168+ let next_prop_mil = tlvs. payment_relay . fee_proportional_millionths as u64 ;
169169 // Use integer arithmetic to compute `ceil(a/b)` as `(a+b-1)/b`
170170 // ((next_base_fee * 1_000_000 + (curr_base_fee * (1_000_000 + next_prop_mil))) + 1_000_000 - 1) / 1_000_000
171171 curr_base_fee = next_prop_mil. checked_add ( 1_000_000 )
You can’t perform that action at this time.
0 commit comments