@@ -23,17 +23,6 @@ pub mod channelmonitor;
23
23
pub mod transaction;
24
24
pub mod keysinterface;
25
25
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
-
37
26
/// An error when accessing the chain via [`Access`].
38
27
///
39
28
/// [`Access`]: trait.Access.html
@@ -46,6 +35,17 @@ pub enum AccessError {
46
35
UnknownTx ,
47
36
}
48
37
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
+
49
49
/// The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as
50
50
/// blocks are connected and disconnected.
51
51
///
0 commit comments