Skip to content

Commit 0c15c20

Browse files
committed
removing differences
1 parent 9c5bb7f commit 0c15c20

File tree

18 files changed

+1581
-1580
lines changed

18 files changed

+1581
-1580
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ethcore/db/src/keys.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use ethereum_types::{H256, H264, U256};
2323
use heapsize::HeapSizeOf;
2424
use kvdb::PREFIX_LEN as DB_PREFIX_LEN;
2525
use rlp;
26-
2726
use rlp_derive::{RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper};
2827

2928
use crate::db::Key;

ethcore/evm/benches/basic.rs

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ extern crate vm;
3131

3232
use criterion::{black_box, Bencher, Criterion};
3333
use ethereum_types::{Address, U256};
34-
3534
use evm::Factory;
3635
use rustc_hex::FromHex;
3736
use std::{str::FromStr, sync::Arc};

ethcore/evm/src/interpreter/memory.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
1616

1717
use ethereum_types::U256;
18-
1918
use vm::ReturnData;
2019

2120
const MAX_RETURN_WASTE_BYTES: usize = 16384;

ethcore/evm/src/interpreter/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use bytes::Bytes;
2828
use ethereum_types::{Address, H256, U256};
2929
use hash::keccak;
3030
use num_bigint::BigUint;
31+
use std::{cmp, marker::PhantomData, mem, sync::Arc};
3132

3233
use evm::CostType;
3334
use instructions::{self, Instruction, InstructionInfo};
@@ -36,6 +37,9 @@ use vm::{
3637
GasLeft, MessageCallResult, ParamsType, ReturnData, Schedule, TrapError, TrapKind,
3738
};
3839

40+
use evm::CostType;
41+
use instructions::{self, Instruction, InstructionInfo};
42+
3943
pub use self::shared_cache::SharedCache;
4044
use self::{
4145
gasometer::Gasometer,

ethcore/evm/src/interpreter/shared_cache.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
1616

17-
use std::sync::Arc;
18-
17+
use super::super::instructions::{self, Instruction};
1918
use bit_set::BitSet;
2019
use ethereum_types::H256;
2120
use hash::KECCAK_EMPTY;
2221
use heapsize::HeapSizeOf;
2322
use memory_cache::MemoryLruCache;
2423
use parking_lot::Mutex;
25-
26-
use super::super::instructions::{self, Instruction};
24+
use std::sync::Arc;
2725

2826
const DEFAULT_CACHE_SIZE: usize = 4 * 1024 * 1024;
2927

ethcore/evm/src/tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
1616

17-
17+
use super::interpreter::MAX_SUB_STACK_SIZE;
1818
use ethereum_types::{Address, H256, U256};
19+
use factory::Factory;
1920
use hex_literal::hex;
2021
use rustc_hex::FromHex;
2122

ethcore/src/engines/clique/mod.rs

+12-12
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl VoteType {
157157

158158
/// Clique Engine implementation
159159
// block_state_by_hash -> block state indexed by header hash.
160-
// #[cfg(not(test))]
160+
#[cfg(not(test))]
161161
pub struct Clique {
162162
epoch_length: u64,
163163
period: u64,
@@ -168,17 +168,17 @@ pub struct Clique {
168168
signer: RwLock<Option<Box<dyn EngineSigner>>>,
169169
}
170170

171-
// #[cfg(test)]
172-
// /// Test version of `CliqueEngine` to make all fields public
173-
// pub struct Clique {
174-
// pub epoch_length: u64,
175-
// pub period: u64,
176-
// pub machine: EthereumMachine,
177-
// pub client: RwLock<Option<Weak<dyn EngineClient>>>,
178-
// pub block_state_by_hash: RwLock<LruCache<H256, CliqueBlockState>>,
179-
// pub proposals: RwLock<HashMap<Address, VoteType>>,
180-
// pub signer: RwLock<Option<Box<dyn EngineSigner>>>,
181-
// }
171+
#[cfg(test)]
172+
/// Test version of `CliqueEngine` to make all fields public
173+
pub struct Clique {
174+
pub epoch_length: u64,
175+
pub period: u64,
176+
pub machine: EthereumMachine,
177+
pub client: RwLock<Option<Weak<dyn EngineClient>>>,
178+
pub block_state_by_hash: RwLock<LruCache<H256, CliqueBlockState>>,
179+
pub proposals: RwLock<HashMap<Address, VoteType>>,
180+
pub signer: RwLock<Option<Box<dyn EngineSigner>>>,
181+
}
182182

183183
impl Clique {
184184
/// Initialize Clique engine from empty state.

ethcore/src/engines/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// along with OpenEthereum. If not, see <http://www.gnu.org/licenses/>.
1616

1717
//! Consensus engine specification and basic implementations.
18-
#![allow(missing_docs)]
18+
1919
mod authority_round;
2020
mod basic_authority;
2121
mod clique;
@@ -185,7 +185,6 @@ impl fmt::Display for EngineError {
185185
ParliaFutureBlock => format!("Receiving future block"),
186186

187187
CliqueCheckpointNoSigner => format!("Checkpoint block list of signers was empty"),
188-
189188
CliqueInvalidNonce(ref mis) => format!(
190189
"Unexpected nonce {} expected {} or {}",
191190
mis,

ethcore/src/miner/miner.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ use client::{
6060
};
6161
use engines::{EngineSigner, EthEngine, Seal};
6262
use error::{Error, ErrorKind};
63+
use executed::ExecutionError;
64+
use executive::contract_address;
6365
use spec::Spec;
6466
use state::State;
6567

@@ -1496,11 +1498,12 @@ mod tests {
14961498
use ethkey::{Generator, Random};
14971499
use hash::keccak;
14981500
use rustc_hex::FromHex;
1501+
use types::BlockNumber;
14991502

15001503
use client::{ChainInfo, EachBlockWith, ImportSealedBlock, TestBlockChainClient};
15011504
use miner::{MinerService, PendingOrdering};
15021505
use test_helpers::{generate_dummy_client, generate_dummy_client_with_spec};
1503-
use types::{transaction::Transaction, BlockNumber};
1506+
use types::transaction::Transaction;
15041507

15051508
#[test]
15061509
fn should_prepare_block_to_seal() {

ethcore/src/miner/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub mod pool_client;
2626
pub mod stratum;
2727

2828
pub use self::miner::{Author, AuthoringParams, Miner, MinerOptions, Penalization, PendingSet};
29-
29+
pub use ethcore_miner::{local_accounts::LocalAccounts, pool::PendingOrdering};
3030

3131
use std::{
3232
collections::{BTreeMap, BTreeSet},

ethcore/src/spec/spec.rs

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ use spec::{seal::Generic as GenericSeal, Genesis};
5050
use state::{backend::Basic as BasicBackend, Backend, State, Substate};
5151
use trace::{NoopTracer, NoopVMTracer};
5252

53+
pub use ethash::OptimizeFor;
54+
5355
const MAX_TRANSACTION_SIZE: usize = 300 * 1024;
5456

5557
// helper for formatting errors.

ethcore/src/state/account.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ use lru_cache::LruCache;
2828
use pod_account::*;
2929
use rlp::{encode, RlpStream};
3030
use std::{
31-
cell::{Cell, RefCell},
32-
collections::{BTreeMap, HashMap},
31+
collections::{BTreeMap, HashMap},
3332
fmt,
3433
sync::Arc,
3534
};
3635
use trie::{Recorder, Trie};
3736
use types::basic_account::BasicAccount;
3837

38+
use std::cell::{Cell, RefCell};
39+
3940
const STORAGE_CACHE_ITEMS: usize = 8192;
4041

4142
/// Boolean type for clean/dirty status.

ethcore/src/state/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ mod substate;
5959

6060
pub mod backend;
6161

62+
pub use self::{account::Account, backend::Backend, substate::Substate};
63+
6264
/// Used to return information about an `State::apply` operation.
6365
pub struct ApplyOutcome<T, V> {
6466
/// The receipt for the applied transaction.

0 commit comments

Comments
 (0)