Merge branch 'master' into ui-2
This commit is contained in:
commit
1b0efa97b2
@ -187,7 +187,14 @@ impl Engine for Arc<Ethash> {
|
|||||||
|
|
||||||
/// Additional engine-specific information for the user/developer concerning `header`.
|
/// Additional engine-specific information for the user/developer concerning `header`.
|
||||||
fn extra_info(&self, header: &Header) -> BTreeMap<String, String> {
|
fn extra_info(&self, header: &Header) -> BTreeMap<String, String> {
|
||||||
map!["nonce".to_owned() => format!("0x{}", header.nonce().hex()), "mixHash".to_owned() => format!("0x{}", header.mix_hash().hex())]
|
if header.seal().len() == self.seal_fields() {
|
||||||
|
map![
|
||||||
|
"nonce".to_owned() => format!("0x{}", header.nonce().hex()),
|
||||||
|
"mixHash".to_owned() => format!("0x{}", header.mix_hash().hex())
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
BTreeMap::default()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn schedule(&self, block_number: BlockNumber) -> Schedule {
|
fn schedule(&self, block_number: BlockNumber) -> Schedule {
|
||||||
|
@ -37,9 +37,9 @@ struct BitVecJournal {
|
|||||||
|
|
||||||
impl BitVecJournal {
|
impl BitVecJournal {
|
||||||
pub fn new(size: usize) -> BitVecJournal {
|
pub fn new(size: usize) -> BitVecJournal {
|
||||||
let extra = if size % 8 > 0 { 1 } else { 0 };
|
let extra = if size % 64 > 0 { 1 } else { 0 };
|
||||||
BitVecJournal {
|
BitVecJournal {
|
||||||
elems: vec![0u64; size / 8 + extra],
|
elems: vec![0u64; size / 64 + extra],
|
||||||
journal: HashSet::new(),
|
journal: HashSet::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user