Skip to content

Commit 637155c

Browse files
committed
Drop SerialId type as bindings don't support primitive aliasing
1 parent cc35650 commit 637155c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ use crate::events::bump_transaction::{BASE_INPUT_WEIGHT, EMPTY_SCRIPT_SIG_WEIGHT
2424
use crate::events::MessageSendEvent;
2525
use crate::ln::channel::TOTAL_BITCOIN_SUPPLY_SATOSHIS;
2626
use crate::ln::msgs;
27-
use crate::ln::msgs::{SerialId, TxSignatures};
27+
use crate::ln::msgs::TxSignatures;
2828
use crate::ln::types::ChannelId;
29+
type SerialId = u64;
2930
use crate::sign::{EntropySource, P2TR_KEY_PATH_WITNESS_WEIGHT, P2WPKH_WITNESS_WEIGHT};
3031
use crate::util::ser::TransactionU16LenLimited;
3132

lightning/src/ln/msgs.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,6 @@ pub struct ChannelReady {
443443
pub short_channel_id_alias: Option<u64>,
444444
}
445445

446-
/// A randomly chosen number that is used to identify inputs within an interactive transaction
447-
/// construction.
448-
pub type SerialId = u64;
449-
450446
/// An `stfu` (quiescence) message to be sent by or received from the stfu initiator.
451447
///
452448
// TODO(splicing): Add spec link for `stfu`; still in draft, using from https://github.com/lightning/bolts/pull/1160
@@ -514,7 +510,7 @@ pub struct TxAddInput {
514510
pub channel_id: ChannelId,
515511
/// A randomly chosen unique identifier for this input, which is even for initiators and odd for
516512
/// non-initiators.
517-
pub serial_id: SerialId,
513+
pub serial_id: u64,
518514
/// Serialized transaction that contains the output this input spends to verify that it is non
519515
/// malleable.
520516
pub prevtx: TransactionU16LenLimited,
@@ -535,7 +531,7 @@ pub struct TxAddOutput {
535531
pub channel_id: ChannelId,
536532
/// A randomly chosen unique identifier for this output, which is even for initiators and odd for
537533
/// non-initiators.
538-
pub serial_id: SerialId,
534+
pub serial_id: u64,
539535
/// The satoshi value of the output
540536
pub sats: u64,
541537
/// The scriptPubKey for the output
@@ -550,7 +546,7 @@ pub struct TxRemoveInput {
550546
/// The channel ID
551547
pub channel_id: ChannelId,
552548
/// The serial ID of the input to be removed
553-
pub serial_id: SerialId,
549+
pub serial_id: u64,
554550
}
555551

556552
/// A [`tx_remove_output`] message for removing an output during interactive transaction construction.
@@ -561,7 +557,7 @@ pub struct TxRemoveOutput {
561557
/// The channel ID
562558
pub channel_id: ChannelId,
563559
/// The serial ID of the output to be removed
564-
pub serial_id: SerialId,
560+
pub serial_id: u64,
565561
}
566562

567563
/// [`A tx_complete`] message signalling the conclusion of a peer's transaction contributions during

0 commit comments

Comments
 (0)