From fa674ef58f750a967c89f39bb51d29ad1803cc5b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 11 May 2024 16:13:02 +0000 Subject: [PATCH] Drop `SerialId` type as bindings don't support primitive aliasing --- lightning/src/ln/interactivetxs.rs | 2 +- lightning/src/ln/msgs.rs | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lightning/src/ln/interactivetxs.rs b/lightning/src/ln/interactivetxs.rs index deec638f7..64cd1d579 100644 --- a/lightning/src/ln/interactivetxs.rs +++ b/lightning/src/ln/interactivetxs.rs @@ -22,8 +22,8 @@ use crate::chain::chaininterface::fee_for_weight; use crate::events::bump_transaction::{BASE_INPUT_WEIGHT, EMPTY_SCRIPT_SIG_WEIGHT}; use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS; use crate::ln::msgs; -use crate::ln::msgs::SerialId; use crate::ln::types::ChannelId; +type SerialId = u64; use crate::sign::{EntropySource, P2TR_KEY_PATH_WITNESS_WEIGHT, P2WPKH_WITNESS_WEIGHT}; use crate::util::ser::TransactionU16LenLimited; diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index b821eb90c..4fc00dff9 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -441,10 +441,6 @@ pub struct ChannelReady { pub short_channel_id_alias: Option, } -/// A randomly chosen number that is used to identify inputs within an interactive transaction -/// construction. -pub type SerialId = u64; - /// An `stfu` (quiescence) message to be sent by or received from the stfu initiator. /// // TODO(splicing): Add spec link for `stfu`; still in draft, using from https://github.com/lightning/bolts/pull/1160 @@ -512,7 +508,7 @@ pub struct TxAddInput { pub channel_id: ChannelId, /// A randomly chosen unique identifier for this input, which is even for initiators and odd for /// non-initiators. - pub serial_id: SerialId, + pub serial_id: u64, /// Serialized transaction that contains the output this input spends to verify that it is non /// malleable. pub prevtx: TransactionU16LenLimited, @@ -533,7 +529,7 @@ pub struct TxAddOutput { pub channel_id: ChannelId, /// A randomly chosen unique identifier for this output, which is even for initiators and odd for /// non-initiators. - pub serial_id: SerialId, + pub serial_id: u64, /// The satoshi value of the output pub sats: u64, /// The scriptPubKey for the output @@ -548,7 +544,7 @@ pub struct TxRemoveInput { /// The channel ID pub channel_id: ChannelId, /// The serial ID of the input to be removed - pub serial_id: SerialId, + pub serial_id: u64, } /// A tx_remove_output message for removing an output during interactive transaction construction. @@ -559,7 +555,7 @@ pub struct TxRemoveOutput { /// The channel ID pub channel_id: ChannelId, /// The serial ID of the output to be removed - pub serial_id: SerialId, + pub serial_id: u64, } /// A tx_complete message signalling the conclusion of a peer's transaction contributions during -- 2.39.5