Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
arkpar committed Sep 5, 2016
1 parent a98733d commit 2b3df3b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rpc/src/v1/impls/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ impl<C, S: ?Sized, M, EM> Eth for EthClient<C, S, M, EM> where
let res = match status.state {
SyncState::Idle => SyncStatus::None,
SyncState::Waiting | SyncState::Blocks | SyncState::NewBlocks | SyncState::ChainHead
| SyncState::SnapshotManifest | SyncState::SnapshotData | SyncState:: SnapshotWaiting => {
| SyncState::SnapshotManifest | SyncState::SnapshotData | SyncState::SnapshotWaiting => {
let current_block = U256::from(take_weak!(self.client).chain_info().best_block_number);
let highest_block = U256::from(status.highest_block_number.unwrap_or(status.start_block_number));

Expand Down
1 change: 0 additions & 1 deletion sync/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2169,7 +2169,6 @@ mod tests {
let mut ss = TestSnapshotService::new();
// should sent some
{

let mut io = TestIo::new(&mut client, &mut ss, &mut queue, None);
let peer_count = sync.propagate_new_transactions(&mut io);
assert_eq!(1, io.queue.len());
Expand Down
3 changes: 2 additions & 1 deletion sync/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.


use util::*;
use util::{H256, Hashable};
use std::collections::HashSet;
use ethcore::snapshot::ManifestData;

#[derive(PartialEq, Eq, Debug)]
Expand Down
3 changes: 1 addition & 2 deletions util/src/kvdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ impl Database {
}

/// Close the database
pub fn close(&self) {
fn close(&self) {
*self.db.write() = None;
self.overlay.write().clear();
}
Expand Down Expand Up @@ -490,7 +490,6 @@ impl Database {
let db = try!(Self::open(&self.config, &self.path));
*self.db.write() = mem::replace(&mut *db.db.write(), None);
*self.overlay.write() = mem::replace(&mut *db.overlay.write(), Vec::new());
println!("Restored {} cols", self.db.read().as_ref().unwrap().cfs.len());
Ok(())
}
}
Expand Down

0 comments on commit 2b3df3b

Please sign in to comment.