* Update test reference. Block test are really not working so I disabled a few by commenting directly in source. * Move ethtest commit cursor. * Implements 'NoProof' engine from https://github.com/ethereum/tests/issues/464 . Since tests has been regenerated those one were failing on block difficulty check. Update ethereum/tests, waiting for cost fix (block test are still commented). * Update tests submodule reference to latest (all test passing except an identified case). Fix block reward of constantinople json. * Restore broken test by using old json tests files. * Use CanonNoSeal instead of a custom engine, still have to include some additional tests code. * Gas upper limit check in json_chain test was bad, moving the test to verification, the test is running in `verify_header_param`. Note that test was previously only for ethash, and now for any engine. * Restore old behavior (gas uper limit only for ethash engine), at the cost of an additional trait method. * Proper rpc test fix. * Update tests submodule, add SStore bug tests. * Fix json issue tabulation. Update tests submodule to latest master (lot of new sstore tests passing) * Switch ethereum/tests to tag 6.0.0-beta.1 (no tests changes from latest synch). * Display hex with separator, use indirection instead of clone for copy types.
This commit is contained in:
@@ -23,6 +23,21 @@ use blockchain::header::Header;
|
||||
use blockchain::block::Block;
|
||||
use spec::{ForkSpec, Genesis, Seal, Ethereum};
|
||||
|
||||
/// Json Block test possible engine kind.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
pub enum Engine {
|
||||
/// Default (old) behaviour.
|
||||
Ethash,
|
||||
/// No check of block's difficulty and nonce for tests.
|
||||
NoProof,
|
||||
}
|
||||
|
||||
impl Default for Engine {
|
||||
fn default() -> Self {
|
||||
Engine::Ethash
|
||||
}
|
||||
}
|
||||
|
||||
/// Blockchain deserialization.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
@@ -45,6 +60,10 @@ pub struct BlockChain {
|
||||
pub best_block: H256,
|
||||
/// Network.
|
||||
pub network: ForkSpec,
|
||||
#[serde(default)]
|
||||
#[serde(rename="sealEngine")]
|
||||
/// Engine
|
||||
pub engine: Engine,
|
||||
}
|
||||
|
||||
impl BlockChain {
|
||||
|
||||
@@ -27,6 +27,7 @@ pub mod test;
|
||||
pub use self::account::Account;
|
||||
pub use self::block::Block;
|
||||
pub use self::blockchain::BlockChain;
|
||||
pub use self::blockchain::Engine;
|
||||
pub use self::header::Header;
|
||||
pub use self::state::State;
|
||||
pub use self::test::Test;
|
||||
|
||||
Reference in New Issue
Block a user