[wallet] Cleanup, remove unnecessary mutable references

This commit is contained in:
Alekos Filini
2020-08-06 10:44:40 +02:00
parent 5683a83288
commit 0954049df0
5 changed files with 43 additions and 71 deletions

View File

@@ -46,13 +46,13 @@ pub trait OnlineBlockchain: Blockchain {
fn get_capabilities(&self) -> HashSet<Capability>;
fn setup<D: BatchDatabase + DatabaseUtils, P: Progress>(
&mut self,
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P,
) -> Result<(), Error>;
fn sync<D: BatchDatabase + DatabaseUtils, P: Progress>(
&mut self,
&self,
stop_gap: Option<usize>,
database: &mut D,
progress_update: P,
@@ -60,10 +60,10 @@ pub trait OnlineBlockchain: Blockchain {
maybe_await!(self.setup(stop_gap, database, progress_update))
}
fn get_tx(&mut self, txid: &Txid) -> Result<Option<Transaction>, Error>;
fn broadcast(&mut self, tx: &Transaction) -> Result<(), Error>;
fn get_tx(&self, txid: &Txid) -> Result<Option<Transaction>, Error>;
fn broadcast(&self, tx: &Transaction) -> Result<(), Error>;
fn get_height(&mut self) -> Result<usize, Error>;
fn get_height(&self) -> Result<usize, Error>;
}
pub type ProgressData = (f32, Option<String>);