mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 20:16:33 -05:00
Use action to name trait
This commit is contained in:
parent
4e91ac467b
commit
81cbc24c46
5 changed files with 25 additions and 25 deletions
|
|
@ -8,7 +8,7 @@ use std::time::Duration;
|
|||
use tokio::time::interval;
|
||||
use xmr_btc::{
|
||||
bitcoin::{
|
||||
BlockHeight, BroadcastSignedTransaction, BuildTxLockPsbt, SignTxLock,
|
||||
BroadcastSignedTransaction, BuildTxLockPsbt, GetBlockHeight, SignTxLock,
|
||||
TransactionBlockHeight, WatchForRawTransaction,
|
||||
},
|
||||
config::Config,
|
||||
|
|
@ -132,8 +132,8 @@ impl GetRawTransaction for Wallet {
|
|||
}
|
||||
|
||||
#[async_trait]
|
||||
impl BlockHeight for Wallet {
|
||||
async fn block_height(&self) -> u32 {
|
||||
impl GetBlockHeight for Wallet {
|
||||
async fn get_block_height(&self) -> u32 {
|
||||
(|| async { Ok(self.inner.client.getblockcount().await?) })
|
||||
.retry(ConstantBackoff::new(Duration::from_secs(1)))
|
||||
.await
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue