Trait BroadcasterInterface

Source
pub trait BroadcasterInterface {
    // Required method
    fn broadcast_transactions(&self, txs: &[&Transaction]);
}
Expand description

An interface to send a transaction to the Bitcoin network.

Required Methods§

Source

fn broadcast_transactions(&self, txs: &[&Transaction])

Sends a list of transactions out to (hopefully) be mined. This only needs to handle the actual broadcasting of transactions, LDK will automatically rebroadcast transactions that haven’t made it into a block.

In some cases LDK may attempt to broadcast a transaction which double-spends another and this isn’t a bug and can be safely ignored.

If more than one transaction is given, these transactions MUST be a single child and its parents and be broadcast together as a package (see the submitpackage Bitcoin Core RPC).

Implementations MUST NOT assume any topological order on the transactions.

Bitcoin transaction packages are defined in BIP 331 and here: https://github.com/bitcoin/bitcoin/blob/master/doc/policy/packages.md

Implementors§