X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-block-sync%2Fsrc%2Frest.rs;h=e04bb86d4270f9c7aec1bc06f49a62b7af2e056a;hb=0ac3b444bea11eaab10632cff1a51c2b666ba75b;hp=3aff104d5546fe520407795d40e10307192a91ec;hpb=8799a2a0440603bb10b7cf121f60e41f0ef1a6fa;p=rust-lightning diff --git a/lightning-block-sync/src/rest.rs b/lightning-block-sync/src/rest.rs index 3aff104d..e04bb86d 100644 --- a/lightning-block-sync/src/rest.rs +++ b/lightning-block-sync/src/rest.rs @@ -1,3 +1,6 @@ +//! Simple REST client implementation which implements [`BlockSource`] against a Bitcoin Core REST +//! endpoint. + use crate::{BlockHeaderData, BlockSource, AsyncBlockSourceResult}; use crate::http::{BinaryResponse, HttpEndpoint, HttpClient, JsonResponse}; @@ -81,7 +84,7 @@ mod tests { let mut client = RestClient::new(server.endpoint()).unwrap(); match client.request_resource::("/").await { - Err(e) => assert_eq!(e.kind(), std::io::ErrorKind::NotFound), + Err(e) => assert_eq!(e.kind(), std::io::ErrorKind::Other), Ok(_) => panic!("Expected error"), } }