Skip to content

Commit 9ac8a3a

Browse files
committed
Move a struct in bindings up to define it before it is used
This is a limitations in the bindings crate, but not one that's going to be fixed right now.
1 parent d5921f6 commit 9ac8a3a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lightning/src/chain/mod.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ pub mod channelmonitor;
2323
pub mod transaction;
2424
pub mod keysinterface;
2525

26-
/// The `Access` trait defines behavior for accessing chain data and state, such as blocks and
27-
/// UTXOs.
28-
pub trait Access: Send + Sync {
29-
/// Returns the transaction output of a funding transaction encoded by [`short_channel_id`].
30-
/// Returns an error if `genesis_hash` is for a different chain or if such a transaction output
31-
/// is unknown.
32-
///
33-
/// [`short_channel_id`]: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#definition-of-short_channel_id
34-
fn get_utxo(&self, genesis_hash: &BlockHash, short_channel_id: u64) -> Result<TxOut, AccessError>;
35-
}
36-
3726
/// An error when accessing the chain via [`Access`].
3827
///
3928
/// [`Access`]: trait.Access.html
@@ -46,6 +35,17 @@ pub enum AccessError {
4635
UnknownTx,
4736
}
4837

38+
/// The `Access` trait defines behavior for accessing chain data and state, such as blocks and
39+
/// UTXOs.
40+
pub trait Access: Send + Sync {
41+
/// Returns the transaction output of a funding transaction encoded by [`short_channel_id`].
42+
/// Returns an error if `genesis_hash` is for a different chain or if such a transaction output
43+
/// is unknown.
44+
///
45+
/// [`short_channel_id`]: https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#definition-of-short_channel_id
46+
fn get_utxo(&self, genesis_hash: &BlockHash, short_channel_id: u64) -> Result<TxOut, AccessError>;
47+
}
48+
4949
/// The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as
5050
/// blocks are connected and disconnected.
5151
///

0 commit comments

Comments
 (0)