Skip to content

Commit 5916b2a

Browse files
committed
Assure BroadcasterInterface packages of len > 1 are child-with-parents
Implementations MUST NOT assume any topological order on the transactions. While Bitcoin Core v29+ `submitpackage` RPC allows packages of length 1 to be submitted via `submitpackage`, it still requires any package submitted there to be a `child-with-parents` package. So we remove the possibility that a batch of transactions passed to a `BroadcasterInterface` implementation contains unrelated transactions, or multiple children.
1 parent 0eec30a commit 5916b2a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lightning/src/chain/chaininterface.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ pub trait BroadcasterInterface {
3636
/// In some cases LDK may attempt to broadcast a transaction which double-spends another
3737
/// and this isn't a bug and can be safely ignored.
3838
///
39-
/// If more than one transaction is given, these transactions should be considered to be a
40-
/// package and broadcast together. Some of the transactions may or may not depend on each other,
41-
/// be sure to manage both cases correctly.
39+
/// If more than one transaction is given, these transactions MUST be considered to be a
40+
/// single-child-with-parents package and be broadcast together
41+
/// (see the `submitpackage` Bitcoin Core RPC).
42+
///
43+
/// Implementations MUST NOT assume any topological order on the transactions.
4244
///
4345
/// Bitcoin transaction packages are defined in BIP 331 and here:
4446
/// <https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md>

0 commit comments

Comments
 (0)