EIPs 155, 160, 161 (#2976)
* The front-end for each hard-fork, also EIP-160. * Address EIP161 a/c * Include EIP-161b * EIP-161 part d. * Fix test build. * Fix one test, add another. * Fix use of bloom & renaming. * Initial groundwork for EIP-155 * Fix minor bug. * Fix all tests finally. * Rest of EIP-155. * Add tests for EIP-155 algorithm. Update transaction tests validation. * Minor reformat. * Address grumbles. * Remove unused code. * Fix SUICIDE gas mechanism and add consensus tests. * Remove commented code. * Set Frontier hardfork block number * Fix warning. * Transaction tests,
This commit is contained in:
@@ -42,7 +42,7 @@ pub struct SyncConfig {
|
||||
/// Max blocks to download ahead
|
||||
pub max_download_ahead_blocks: usize,
|
||||
/// Network ID
|
||||
pub network_id: U256,
|
||||
pub network_id: usize,
|
||||
/// Main "eth" subprotocol name.
|
||||
pub subprotocol_name: [u8; 3],
|
||||
/// Fork block to check
|
||||
@@ -55,7 +55,7 @@ impl Default for SyncConfig {
|
||||
fn default() -> SyncConfig {
|
||||
SyncConfig {
|
||||
max_download_ahead_blocks: 20000,
|
||||
network_id: U256::from(1),
|
||||
network_id: 1,
|
||||
subprotocol_name: *b"eth",
|
||||
fork_block: None,
|
||||
warp_sync: false,
|
||||
|
||||
@@ -188,7 +188,7 @@ pub struct SyncStatus {
|
||||
/// Syncing protocol version. That's the maximum protocol version we connect to.
|
||||
pub protocol_version: u8,
|
||||
/// The underlying p2p network version.
|
||||
pub network_id: U256,
|
||||
pub network_id: usize,
|
||||
/// `BlockChain` height for the moment the sync started.
|
||||
pub start_block_number: BlockNumber,
|
||||
/// Last fully downloaded and imported block number (if any).
|
||||
@@ -269,7 +269,7 @@ struct PeerInfo {
|
||||
/// Peer chain genesis hash
|
||||
genesis: H256,
|
||||
/// Peer network id
|
||||
network_id: U256,
|
||||
network_id: usize,
|
||||
/// Peer best block hash
|
||||
latest_hash: H256,
|
||||
/// Peer total difficulty if known
|
||||
@@ -328,7 +328,7 @@ pub struct ChainSync {
|
||||
/// Last propagated block number
|
||||
last_sent_block_number: BlockNumber,
|
||||
/// Network ID
|
||||
network_id: U256,
|
||||
network_id: usize,
|
||||
/// Optional fork block to check
|
||||
fork_block: Option<(BlockNumber, H256)>,
|
||||
/// Snapshot downloader.
|
||||
@@ -2145,7 +2145,7 @@ mod tests {
|
||||
PeerInfo {
|
||||
protocol_version: 0,
|
||||
genesis: H256::zero(),
|
||||
network_id: U256::zero(),
|
||||
network_id: 0,
|
||||
latest_hash: peer_latest_hash,
|
||||
difficulty: None,
|
||||
asking: PeerAsking::Nothing,
|
||||
|
||||
Reference in New Issue
Block a user