X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-block-sync%2Fsrc%2Flib.rs;h=0a7c655147ff0c85faf1297a2830d95b1f5746ce;hb=refs%2Fheads%2F2023-02-0.0.114-java-bindings;hp=5d8bc27f8d141c2dcaaad9f1f53f97a25daa1cb0;hpb=a922830ebbea1207d178b455237abe5474598026;p=rust-lightning diff --git a/lightning-block-sync/src/lib.rs b/lightning-block-sync/src/lib.rs index 5d8bc27f..0a7c6551 100644 --- a/lightning-block-sync/src/lib.rs +++ b/lightning-block-sync/src/lib.rs @@ -98,7 +98,7 @@ pub struct BlockSourceError { } /// The kind of `BlockSourceError`, either persistent or transient. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum BlockSourceErrorKind { /// Indicates an error that won't resolve when retrying a request (e.g., invalid data). Persistent, @@ -132,6 +132,9 @@ impl BlockSourceError { } /// Converts the error into the underlying error. + /// + /// May contain an [`std::io::Error`] from the [`BlockSource`]. See implementations for further + /// details, if any. pub fn into_inner(self) -> Box { self.error } @@ -139,7 +142,7 @@ impl BlockSourceError { /// A block header and some associated data. This information should be available from most block /// sources (and, notably, is available in Bitcoin Core's RPC and REST interfaces). -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct BlockHeaderData { /// The block header itself. pub header: BlockHeader,