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>(
156
156
pub ( super ) fn compute_payinfo (
157
157
intermediate_nodes : & [ ( PublicKey , ForwardTlvs ) ] , payee_tlvs : & ReceiveTlvs
158
158
) -> 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 ;
161
161
let mut cltv_expiry_delta: u16 = 0 ;
162
162
for ( _, tlvs) in intermediate_nodes. iter ( ) . rev ( ) {
163
163
// In the future, we'll want to take the intersection of all supported features for the
164
164
// `BlindedPayInfo`, but there are no features in that context right now.
165
165
if tlvs. features . requires_unknown_bits ( ) { return Err ( ( ) ) }
166
166
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 ;
169
169
// Use integer arithmetic to compute `ceil(a/b)` as `(a+b-1)/b`
170
170
// ((next_base_fee * 1_000_000 + (curr_base_fee * (1_000_000 + next_prop_mil))) + 1_000_000 - 1) / 1_000_000
171
171
curr_base_fee = next_prop_mil. checked_add ( 1_000_000 )
You can’t perform that action at this time.
0 commit comments