move additional_info to engines, fixes registry on non-ethash chains

This commit is contained in:
Robert Habermeier
2017-10-05 15:34:30 +02:00
parent 3f520b864b
commit bae6a5eeec
3 changed files with 15 additions and 8 deletions

View File

@@ -16,7 +16,7 @@
//! Ethereum-like state machine definition.
use std::collections::BTreeMap;
use std::collections::{BTreeMap, HashMap};
use std::cmp;
use std::sync::Arc;
@@ -378,6 +378,13 @@ impl EthereumMachine {
pub fn supports_wasm(&self) -> bool {
self.params().wasm
}
/// Additional params.
pub fn additional_params(&self) -> HashMap<String, String> {
hash_map![
"registrar".to_owned() => self.params.registrar.hex()
]
}
}
/// Auxiliary data fetcher for an Ethereum machine. In Ethereum-like machines