@@ -490,6 +490,7 @@ pub fn enact(
|
||||
}
|
||||
|
||||
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header
|
||||
#[cfg_attr(feature="dev", allow(too_many_arguments))]
|
||||
pub fn enact_bytes(
|
||||
block_bytes: &[u8],
|
||||
engine: &Engine,
|
||||
@@ -506,6 +507,7 @@ pub fn enact_bytes(
|
||||
}
|
||||
|
||||
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header
|
||||
#[cfg_attr(feature="dev", allow(too_many_arguments))]
|
||||
pub fn enact_verified(
|
||||
block: &PreverifiedBlock,
|
||||
engine: &Engine,
|
||||
@@ -521,6 +523,7 @@ pub fn enact_verified(
|
||||
}
|
||||
|
||||
/// Enact the block given by `block_bytes` using `engine` on the database `db` with given `parent` block header. Seal the block aferwards
|
||||
#[cfg_attr(feature="dev", allow(too_many_arguments))]
|
||||
pub fn enact_and_seal(
|
||||
block_bytes: &[u8],
|
||||
engine: &Engine,
|
||||
|
||||
@@ -228,7 +228,7 @@ pub enum Error {
|
||||
/// The value of the nonce or mishash is invalid.
|
||||
PowInvalid,
|
||||
/// Error concerning TrieDBs
|
||||
TrieError(TrieError),
|
||||
Trie(TrieError),
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
@@ -244,7 +244,7 @@ impl fmt::Display for Error {
|
||||
f.write_fmt(format_args!("Unknown engine name ({})", name)),
|
||||
Error::PowHashInvalid => f.write_str("Invalid or out of date PoW hash."),
|
||||
Error::PowInvalid => f.write_str("Invalid nonce or mishash"),
|
||||
Error::TrieError(ref err) => f.write_fmt(format_args!("{}", err)),
|
||||
Error::Trie(ref err) => f.write_fmt(format_args!("{}", err)),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -308,7 +308,7 @@ impl From<IoError> for Error {
|
||||
|
||||
impl From<TrieError> for Error {
|
||||
fn from(err: TrieError) -> Error {
|
||||
Error::TrieError(err)
|
||||
Error::Trie(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ impl Engine for Ethash {
|
||||
} else {
|
||||
let mut s = Schedule::new_homestead();
|
||||
if self.ethash_params.dao_rescue_soft_fork {
|
||||
s.reject_dao_transactions = env_info.dao_rescue_block_gas_limit.map(|x| x <= 4_000_000.into()).unwrap_or(false);
|
||||
s.reject_dao_transactions = env_info.dao_rescue_block_gas_limit.map_or(false, |x| x <= 4_000_000.into());
|
||||
}
|
||||
s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user