mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 23:08:39 +01:00
Use WriteStore trait object for Index::update()
This commit is contained in:
parent
32226298e2
commit
d08411109f
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ use std::sync::RwLock;
|
|||
use std::time::{Duration, Instant};
|
||||
|
||||
use daemon::Daemon;
|
||||
use store::{DBStore, ReadStore, Row, WriteStore};
|
||||
use store::{ReadStore, Row, WriteStore};
|
||||
use util::{full_hash, hash_prefix, Bytes, FullHash, HashPrefix, HeaderEntry, HeaderList,
|
||||
HeaderMap, HASH_PREFIX_LEN};
|
||||
|
||||
|
@ -379,7 +379,7 @@ impl Index {
|
|||
.cloned()
|
||||
}
|
||||
|
||||
pub fn update(&self, store: &DBStore, daemon: &Daemon) -> Result<Sha256dHash> {
|
||||
pub fn update(&self, store: &WriteStore, daemon: &Daemon) -> Result<Sha256dHash> {
|
||||
let tip = daemon.getbestblockhash()?;
|
||||
let new_headers = daemon.get_new_headers(&self.headers.read().unwrap(), &tip)?;
|
||||
new_headers.last().map(|tip| {
|
||||
|
|
Loading…
Add table
Reference in a new issue