@@ -462,7 +462,7 @@ pub fn make_funding_redeemscript(a: &PublicKey, b: &PublicKey) -> Script {
462462}
463463
464464/// 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 {
466466 let mut txins: Vec < TxIn > = Vec :: new ( ) ;
467467 txins. push ( TxIn {
468468 previous_output : OutPoint {
@@ -475,9 +475,9 @@ pub fn build_htlc_transaction(prev_hash: &Txid, feerate_per_kw: u64, to_self_del
475475 } ) ;
476476
477477 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
479479 } else {
480- feerate_per_kw * HTLC_SUCCESS_TX_WEIGHT / 1000
480+ feerate_per_kw as u64 * HTLC_SUCCESS_TX_WEIGHT / 1000
481481 } ;
482482
483483 let mut txouts: Vec < TxOut > = Vec :: new ( ) ;
@@ -513,7 +513,7 @@ pub struct LocalCommitmentTransaction {
513513 pub local_keys : TxCreationKeys ,
514514 /// The feerate paid per 1000-weight-unit in this commitment transaction. This value is
515515 /// controlled by the channel initiator.
516- pub feerate_per_kw : u64 ,
516+ pub feerate_per_kw : u32 ,
517517 /// The HTLCs and remote htlc signatures which were included in this commitment transaction.
518518 ///
519519 /// Note that this includes all HTLCs, including ones which were considered dust and not
@@ -561,7 +561,7 @@ impl LocalCommitmentTransaction {
561561
562562 /// Generate a new LocalCommitmentTransaction based on a raw commitment transaction,
563563 /// 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 {
565565 if unsigned_tx. input . len ( ) != 1 { panic ! ( "Tried to store a commitment transaction that had input count != 1!" ) ; }
566566 if unsigned_tx. input [ 0 ] . witness . len ( ) != 0 { panic ! ( "Tried to store a signed commitment transaction?" ) ; }
567567
0 commit comments