@@ -462,7 +462,7 @@ pub fn make_funding_redeemscript(a: &PublicKey, b: &PublicKey) -> Script {
462
462
}
463
463
464
464
/// panics if htlc.transaction_output_index.is_none()!
465
- pub fn build_htlc_transaction ( prev_hash : & Txid , feerate_per_kw : u64 , to_self_delay : u16 , htlc : & HTLCOutputInCommitment , a_delayed_payment_key : & PublicKey , revocation_key : & PublicKey ) -> Transaction {
465
+ pub fn build_htlc_transaction ( prev_hash : & Txid , feerate_per_kw : u32 , to_self_delay : u16 , htlc : & HTLCOutputInCommitment , a_delayed_payment_key : & PublicKey , revocation_key : & PublicKey ) -> Transaction {
466
466
let mut txins: Vec < TxIn > = Vec :: new ( ) ;
467
467
txins. push ( TxIn {
468
468
previous_output : OutPoint {
@@ -475,9 +475,9 @@ pub fn build_htlc_transaction(prev_hash: &Txid, feerate_per_kw: u64, to_self_del
475
475
} ) ;
476
476
477
477
let total_fee = if htlc. offered {
478
- feerate_per_kw * HTLC_TIMEOUT_TX_WEIGHT / 1000
478
+ feerate_per_kw as u64 * HTLC_TIMEOUT_TX_WEIGHT / 1000
479
479
} else {
480
- feerate_per_kw * HTLC_SUCCESS_TX_WEIGHT / 1000
480
+ feerate_per_kw as u64 * HTLC_SUCCESS_TX_WEIGHT / 1000
481
481
} ;
482
482
483
483
let mut txouts: Vec < TxOut > = Vec :: new ( ) ;
@@ -513,7 +513,7 @@ pub struct LocalCommitmentTransaction {
513
513
pub local_keys : TxCreationKeys ,
514
514
/// The feerate paid per 1000-weight-unit in this commitment transaction. This value is
515
515
/// controlled by the channel initiator.
516
- pub feerate_per_kw : u64 ,
516
+ pub feerate_per_kw : u32 ,
517
517
/// The HTLCs and remote htlc signatures which were included in this commitment transaction.
518
518
///
519
519
/// Note that this includes all HTLCs, including ones which were considered dust and not
@@ -561,7 +561,7 @@ impl LocalCommitmentTransaction {
561
561
562
562
/// Generate a new LocalCommitmentTransaction based on a raw commitment transaction,
563
563
/// remote signature and both parties keys
564
- pub ( crate ) fn new_missing_local_sig ( unsigned_tx : Transaction , their_sig : Signature , our_funding_key : & PublicKey , their_funding_key : & PublicKey , local_keys : TxCreationKeys , feerate_per_kw : u64 , htlc_data : Vec < ( HTLCOutputInCommitment , Option < Signature > ) > ) -> LocalCommitmentTransaction {
564
+ pub ( crate ) fn new_missing_local_sig ( unsigned_tx : Transaction , their_sig : Signature , our_funding_key : & PublicKey , their_funding_key : & PublicKey , local_keys : TxCreationKeys , feerate_per_kw : u32 , htlc_data : Vec < ( HTLCOutputInCommitment , Option < Signature > ) > ) -> LocalCommitmentTransaction {
565
565
if unsigned_tx. input . len ( ) != 1 { panic ! ( "Tried to store a commitment transaction that had input count != 1!" ) ; }
566
566
if unsigned_tx. input [ 0 ] . witness . len ( ) != 0 { panic ! ( "Tried to store a signed commitment transaction?" ) ; }
567
567
0 commit comments