Merge branch 'master' into signer-rpc
This commit is contained in:
commit
30362bfebe
@ -17,7 +17,7 @@
|
|||||||
use bloomchain::group as bc;
|
use bloomchain::group as bc;
|
||||||
use util::HeapSizeOf;
|
use util::HeapSizeOf;
|
||||||
|
|
||||||
/// Represents BloomGroup position in database.
|
/// Represents `BloomGroup` position in database.
|
||||||
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
|
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
|
||||||
pub struct GroupPosition {
|
pub struct GroupPosition {
|
||||||
/// Bloom level.
|
/// Bloom level.
|
||||||
|
@ -54,7 +54,7 @@ impl Key<BlockTraces> for H256 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wrapper around blooms::GroupPosition so it could be
|
/// Wrapper around `blooms::GroupPosition` so it could be
|
||||||
/// uniquely identified in the database.
|
/// uniquely identified in the database.
|
||||||
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
|
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
|
||||||
struct TraceGroupPosition(blooms::GroupPosition);
|
struct TraceGroupPosition(blooms::GroupPosition);
|
||||||
|
@ -73,7 +73,7 @@ fn version_file_path(path: &PathBuf) -> PathBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Reads current database version from the file at given path.
|
/// Reads current database version from the file at given path.
|
||||||
/// If the file does not exist returns DEFAULT_VERSION.
|
/// If the file does not exist returns `DEFAULT_VERSION`.
|
||||||
fn current_version(path: &PathBuf) -> Result<u32, Error> {
|
fn current_version(path: &PathBuf) -> Result<u32, Error> {
|
||||||
match File::open(version_file_path(path)) {
|
match File::open(version_file_path(path)) {
|
||||||
Err(ref err) if err.kind() == ErrorKind::NotFound => Ok(DEFAULT_VERSION),
|
Err(ref err) if err.kind() == ErrorKind::NotFound => Ok(DEFAULT_VERSION),
|
||||||
|
Loading…
Reference in New Issue
Block a user