You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let feerate = fee_estimator.get_est_sat_per_vbyte(ConfirmationTarget::Normal);
369
-
let background_feerate = fee_estimator.get_est_sat_per_vbyte(ConfirmationTarget::Background);
368
+
let feerate = fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::Normal);
369
+
let background_feerate = fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::Background);
370
370
371
371
let secp_ctx = Secp256k1::new();
372
372
let our_channel_monitor_claim_key_hash = Hash160::from_data(&PublicKey::from_secret_key(&secp_ctx,&chan_keys.channel_monitor_claim_key).unwrap().serialize());
returnErr(HandleError{err:"Peer's feerate much too high",action:Some(msgs::ErrorAction::DisconnectPeer{msg:None})});
440
440
}
441
441
Ok(())
@@ -477,7 +477,7 @@ impl Channel {
477
477
478
478
let their_announce = if(msg.channel_flags&1) == 1{true}else{false};
479
479
480
-
let background_feerate = fee_estimator.get_est_sat_per_vbyte(ConfirmationTarget::Background);
480
+
let background_feerate = fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::Background);
481
481
482
482
let secp_ctx = Secp256k1::new();
483
483
let our_channel_monitor_claim_key_hash = Hash160::from_data(&PublicKey::from_secret_key(&secp_ctx,&chan_keys.channel_monitor_claim_key).unwrap().serialize());
@@ -1650,12 +1650,12 @@ impl Channel {
1650
1650
let our_closing_script = self.get_closing_scriptpubkey();
returnErr(HandleError{err:"Unable to come to consensus about closing feerate, remote wanted something lower than our Background feerate",action:None});
@@ -1857,15 +1857,15 @@ impl Channel {
1857
1857
// output value back into a transaction with the regular channel output:
1858
1858
1859
1859
// the fee cost of the HTLC-Success/HTLC-Timeout transaction:
1860
-
letmut res = self.feerate_per_kw* cmp::max(HTLC_TIMEOUT_TX_WEIGHT,HTLC_SUCCESS_TX_WEIGHT);
1860
+
letmut res = self.feerate_per_kw* cmp::max(HTLC_TIMEOUT_TX_WEIGHT,HTLC_SUCCESS_TX_WEIGHT) / 1000;
1861
1861
1862
1862
ifself.channel_outbound{
1863
1863
// + the marginal fee increase cost to us in the commitment transaction:
1864
-
res += self.feerate_per_kw*COMMITMENT_TX_WEIGHT_PER_HTLC;
1864
+
res += self.feerate_per_kw*COMMITMENT_TX_WEIGHT_PER_HTLC / 1000;
1865
1865
}
1866
1866
1867
1867
// + the marginal cost of an input which spends the HTLC-Success/HTLC-Timeout output:
1868
-
res += fee_estimator.get_est_sat_per_vbyte(ConfirmationTarget::Normal)*SPENDING_INPUT_FOR_A_OUTPUT_WEIGHT*250;
1868
+
res += fee_estimator.get_est_sat_per_1000_weight(ConfirmationTarget::Normal)*SPENDING_INPUT_FOR_A_OUTPUT_WEIGHT/ 1000;
0 commit comments