[tests] Add a proc macro to generate tests for OnlineBlockchain types
This commit is contained in:
@@ -15,6 +15,13 @@ use crate::FeeRate;
|
||||
|
||||
pub struct ElectrumBlockchain(Option<Client>);
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(feature = "test-electrum")]
|
||||
#[magical_blockchain_tests(crate)]
|
||||
fn local_electrs() -> ElectrumBlockchain {
|
||||
ElectrumBlockchain::from(Client::new(&testutils::get_electrum_url(), None).unwrap())
|
||||
}
|
||||
|
||||
impl std::convert::From<Client> for ElectrumBlockchain {
|
||||
fn from(client: Client) -> Self {
|
||||
ElectrumBlockchain(Some(client))
|
||||
|
||||
Reference in New Issue
Block a user