[wallet] Add a type convert fee units, add Wallet::estimate_fee()

This commit is contained in:
Alekos Filini
2020-08-07 11:23:01 +02:00
parent 5f80950971
commit 08792b2fcd
8 changed files with 115 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ use bitcoin::{Transaction, Txid};
use crate::database::{BatchDatabase, DatabaseUtils};
use crate::error::Error;
use crate::FeeRate;
pub mod utils;
@@ -64,6 +65,7 @@ pub trait OnlineBlockchain: Blockchain {
fn broadcast(&self, tx: &Transaction) -> Result<(), Error>;
fn get_height(&self) -> Result<usize, Error>;
fn estimate_fee(&self, target: usize) -> Result<FeeRate, Error>;
}
pub type ProgressData = (f32, Option<String>);