Document Bitcoin RPC and make it more robust

This commit is contained in:
Luke Parker
2023-03-17 21:25:38 -04:00
parent 9b47ad56bb
commit 0525ba2f62
8 changed files with 64 additions and 13 deletions

View File

@@ -215,8 +215,8 @@ impl PartialEq for Bitcoin {
impl Eq for Bitcoin {}
impl Bitcoin {
pub fn new(url: String) -> Bitcoin {
Bitcoin { rpc: Rpc::new(url) }
pub async fn new(url: String) -> Bitcoin {
Bitcoin { rpc: Rpc::new(url).await.expect("couldn't create a Bitcoin RPC") }
}
#[cfg(test)]