diff --git a/.travis.yml b/.travis.yml
index fff7c94ed..7589697af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -49,9 +49,8 @@ after_success: |
cargo doc --no-deps --verbose ${KCOV_FEATURES} ${TARGETS} &&
echo '' > target/doc/index.html &&
pip install --user ghp-import &&
- /home/travis/.local/bin/ghp-import -n target/doc
- #&&
- #git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
+ /home/travis/.local/bin/ghp-import -n target/doc &&
+ git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
env:
global:
- secure: 3sUjNi9mhdL5h1GTm8LONnDN/SYvUHT+WSkMl93h3nYiLCQXk8eZaPS98AS7oOaTsfW4UvnwckVFCFl49ttInsv4cd/TkAxmrJHe6kPyS9/4NWUdmP8BjicbBvL/ioSdXMECMEYzPDLV+I3KhtC2LcB6ceDEl/XwMOJlzbGf7RbtcXGVQgMLqSYY1YKjQA4vbT5nFgIS/sZu3Z9yFgN0GafnihKcizqoHhdJjs/zxmX+qJepnC6o3V6KcFnS7QHhM1JOr85twE6S422UlvNaEb5ovwLPqmOl5+fA+6shbx4AxFTY6E9Iors+OVY/JliFhrqOdCt0i2P1FUHN4kbGZQkf0rphN/ZOI2uKNFTOyXiPvppfo/ZemKmcqkwkqP9+lf5QqYmtE6hsAYagxn49xJZILl8tAYbdqxF5gxa+TEVrfsBFtz/Sv3q8QhKQNPAmjEcKyMatyEreLUIFEpFTGIco8jN4eXeSoLRdJ+Z75ihttfQWhNfUDgNL30iQLy0AgFSsh/cyb5M8y9lxrGDzDTogvaiKGwr/V45sPkcXWCkmOgMdINqBB6ZtdL3bGHdyjmYj+y3btjf3aP11k++BL0fXIaKn25aS/p/9iyGb1FyGCM03o4ZRQ3YhTOvfMRfRGf6nWbaMx9upv8o5ShSdysewhrnh3082r7u896ny1Ho=
@@ -60,7 +59,7 @@ env:
deploy:
provider: releases
api_key:
- secure: 3sUjNi9mhdL5h1GTm8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+DhQzpVBHaBiseSNlYE1YN/3jNyGY+iSts1qut+1BwE7swmcTLsAPoAy8Ue+f7ErNoCg1lm71vq7VO2DLn7x2NqHyHUEuJ+7olDHSdE84G7d9otDRu/+TfMOw7GXwTaha6yJRInuNsnj4CFMLNVvYACzCC2idB7f7nUZoSFi9jf18S9fCMPVmazMrFj4g95HWrVHkjpV5zRTeUdTWw6DJl6pC9HFqORHdCvLv4Rc4dm5r3CmOcAQ0ZuiccV2oKzw4/Wic96daae8M5f5KSQ/WTr+h0wXZKp0="
skip_cleanup: true
file: parity${ARCHIVE_SUFFIX}.tar.gz
on:
diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml
index d9c80f3a3..be7652e17 100644
--- a/ethcore/Cargo.toml
+++ b/ethcore/Cargo.toml
@@ -10,12 +10,10 @@ authors = ["Ethcore "]
log = "0.3"
env_logger = "0.3"
rustc-serialize = "0.3"
-flate2 = "0.2"
rocksdb = "0.3"
heapsize = "0.2.0"
rust-crypto = "0.2.34"
time = "0.1"
-#interpolate_idents = { git = "https://github.com/SkylerLipthay/interpolate_idents" }
ethcore-util = { path = "../util" }
evmjit = { path = "../evmjit", optional = true }
ethash = { path = "../ethash" }
diff --git a/ethcore/src/account.rs b/ethcore/src/account.rs
index ab7ad1e53..0d535f7ce 100644
--- a/ethcore/src/account.rs
+++ b/ethcore/src/account.rs
@@ -21,6 +21,7 @@ pub struct Account {
}
impl Account {
+ #[cfg(test)]
/// General constructor.
pub fn new(balance: U256, nonce: U256, storage: HashMap, code: Bytes) -> Account {
Account {
@@ -83,15 +84,8 @@ impl Account {
}
}
- /// Reset this account to the status of a not-yet-initialised contract.
- /// NOTE: Account should have `init_code()` called on it later.
- pub fn reset_code(&mut self) {
- self.code_hash = None;
- self.code_cache = vec![];
- }
-
/// Set this account's code to the given code.
- /// NOTE: Account should have been created with `new_contract()` or have `reset_code()` called on it.
+ /// NOTE: Account should have been created with `new_contract()`
pub fn init_code(&mut self, code: Bytes) {
assert!(self.code_hash.is_none());
self.code_cache = code;
diff --git a/ethcore/src/env_info.rs b/ethcore/src/env_info.rs
index 8b037036e..7c0516d2a 100644
--- a/ethcore/src/env_info.rs
+++ b/ethcore/src/env_info.rs
@@ -24,13 +24,6 @@ pub struct EnvInfo {
pub gas_used: U256,
}
-impl EnvInfo {
- /// Create empty env_info initialized with zeros
- pub fn new() -> EnvInfo {
- EnvInfo::default()
- }
-}
-
impl Default for EnvInfo {
fn default() -> Self {
EnvInfo {
@@ -97,4 +90,4 @@ r#"
assert_eq!(default_env_info.difficulty, x!(0));
}
-}
\ No newline at end of file
+}
diff --git a/ethcore/src/executive.rs b/ethcore/src/executive.rs
index 1471bdca3..b67b71306 100644
--- a/ethcore/src/executive.rs
+++ b/ethcore/src/executive.rs
@@ -399,7 +399,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(0x100u64));
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
@@ -458,7 +458,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(100));
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
@@ -512,7 +512,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(100));
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
@@ -564,7 +564,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(100));
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(1024, factory);
let mut substate = Substate::new();
@@ -624,7 +624,7 @@ mod tests {
state.init_code(&address_b, code_b.clone());
state.add_balance(&sender, &U256::from(100_000));
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
@@ -668,7 +668,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.init_code(&address, code.clone());
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
@@ -694,7 +694,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(18));
- let mut info = EnvInfo::new();
+ let mut info = EnvInfo::default();
info.gas_limit = U256::from(100_000);
let engine = TestEngine::new(0, factory);
@@ -721,7 +721,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
- let mut info = EnvInfo::new();
+ let mut info = EnvInfo::default();
info.gas_limit = U256::from(100_000);
let engine = TestEngine::new(0, factory);
@@ -746,7 +746,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(17));
- let mut info = EnvInfo::new();
+ let mut info = EnvInfo::default();
info.gas_limit = U256::from(100_000);
let engine = TestEngine::new(0, factory);
@@ -772,7 +772,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(17));
- let mut info = EnvInfo::new();
+ let mut info = EnvInfo::default();
info.gas_used = U256::from(20_000);
info.gas_limit = U256::from(100_000);
let engine = TestEngine::new(0, factory);
@@ -799,7 +799,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from(100_017));
- let mut info = EnvInfo::new();
+ let mut info = EnvInfo::default();
info.gas_limit = U256::from(100_000);
let engine = TestEngine::new(0, factory);
@@ -833,7 +833,7 @@ mod tests {
let mut state_result = get_temp_state();
let mut state = state_result.reference_mut();
state.add_balance(&sender, &U256::from_str("152d02c7e14af6800000").unwrap());
- let info = EnvInfo::new();
+ let info = EnvInfo::default();
let engine = TestEngine::new(0, factory);
let mut substate = Substate::new();
diff --git a/ethcore/src/header.rs b/ethcore/src/header.rs
index 531ab93f0..69dba5ec8 100644
--- a/ethcore/src/header.rs
+++ b/ethcore/src/header.rs
@@ -13,39 +13,39 @@ pub type BlockNumber = u64;
/// which is non-specific.
///
/// Doesn't do all that much on its own.
-#[derive(Default, Debug, Clone)]
+#[derive(Debug, Clone)]
pub struct Header {
// TODO: make all private.
- /// TODO [Gav Wood] Please document me
+ /// Parent hash.
pub parent_hash: H256,
- /// TODO [arkpar] Please document me
+ /// Block timestamp.
pub timestamp: u64,
- /// TODO [debris] Please document me
+ /// Block number.
pub number: BlockNumber,
- /// TODO [Gav Wood] Please document me
+ /// Block author.
pub author: Address,
- /// TODO [debris] Please document me
+ /// Transactions root.
pub transactions_root: H256,
- /// TODO [debris] Please document me
+ /// Block uncles hash.
pub uncles_hash: H256,
- /// TODO [Gav Wood] Please document me
+ /// Block extra data.
pub extra_data: Bytes,
- /// TODO [debris] Please document me
+ /// State root.
pub state_root: H256,
- /// TODO [debris] Please document me
+ /// Block receipts root.
pub receipts_root: H256,
- /// TODO [debris] Please document me
+ /// Block bloom.
pub log_bloom: LogBloom,
- /// TODO [debris] Please document me
+ /// Gas used for contracts execution.
pub gas_used: U256,
- /// TODO [Gav Wood] Please document me
+ /// Block gas limit.
pub gas_limit: U256,
- /// TODO [debris] Please document me
+ /// Block difficulty.
pub difficulty: U256,
- /// TODO [arkpar] Please document me
+ /// Block seal.
pub seal: Vec,
/// TODO [arkpar] Please document me
@@ -54,9 +54,8 @@ pub struct Header {
pub bare_hash: RefCell