Skip to content

Commit 434e768

Browse files
committed
Drop SerialId type as bindings don't support primitive aliasing
1 parent b359b6e commit 434e768

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ use crate::chain::chaininterface::fee_for_weight;
2323
use crate::events::bump_transaction::{BASE_INPUT_WEIGHT, EMPTY_SCRIPT_SIG_WEIGHT};
2424
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
2525
use crate::ln::msgs;
26-
use crate::ln::msgs::SerialId;
2726
use crate::ln::types::ChannelId;
27+
type SerialId = u64;
2828
use crate::sign::{EntropySource, P2TR_KEY_PATH_WITNESS_WEIGHT, P2WPKH_WITNESS_WEIGHT};
2929
use crate::util::ser::TransactionU16LenLimited;
3030

lightning/src/ln/msgs.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,6 @@ pub struct ChannelReady {
406406
pub short_channel_id_alias: Option<u64>,
407407
}
408408

409-
/// A randomly chosen number that is used to identify inputs within an interactive transaction
410-
/// construction.
411-
pub type SerialId = u64;
412-
413409
/// An stfu (quiescence) message to be sent by or received from the stfu initiator.
414410
// TODO(splicing): Add spec link for `stfu`; still in draft, using from https://github.com/lightning/bolts/pull/863
415411
#[derive(Clone, Debug, PartialEq, Eq)]
@@ -473,7 +469,7 @@ pub struct TxAddInput {
473469
pub channel_id: ChannelId,
474470
/// A randomly chosen unique identifier for this input, which is even for initiators and odd for
475471
/// non-initiators.
476-
pub serial_id: SerialId,
472+
pub serial_id: u64,
477473
/// Serialized transaction that contains the output this input spends to verify that it is non
478474
/// malleable.
479475
pub prevtx: TransactionU16LenLimited,
@@ -492,7 +488,7 @@ pub struct TxAddOutput {
492488
pub channel_id: ChannelId,
493489
/// A randomly chosen unique identifier for this output, which is even for initiators and odd for
494490
/// non-initiators.
495-
pub serial_id: SerialId,
491+
pub serial_id: u64,
496492
/// The satoshi value of the output
497493
pub sats: u64,
498494
/// The scriptPubKey for the output
@@ -507,7 +503,7 @@ pub struct TxRemoveInput {
507503
/// The channel ID
508504
pub channel_id: ChannelId,
509505
/// The serial ID of the input to be removed
510-
pub serial_id: SerialId,
506+
pub serial_id: u64,
511507
}
512508

513509
/// A tx_remove_output message for removing an output during interactive transaction construction.
@@ -518,7 +514,7 @@ pub struct TxRemoveOutput {
518514
/// The channel ID
519515
pub channel_id: ChannelId,
520516
/// The serial ID of the output to be removed
521-
pub serial_id: SerialId,
517+
pub serial_id: u64,
522518
}
523519

524520
/// A tx_complete message signalling the conclusion of a peer's transaction contributions during

0 commit comments

Comments
 (0)