Merge branch 'master' of github.com:ethcore/parity into thread

This commit is contained in:
arkpar 2016-02-29 18:25:06 +01:00
commit dff7f2e8e5
8 changed files with 22 additions and 15 deletions

View File

@ -1,9 +1,9 @@
{
"name": "Frontier",
"name": "Frontier/Homestead",
"engineName": "Ethash",
"params": {
"accountStartNonce": "0x00",
"frontierCompatibilityModeLimit": "0x10c8e0",
"frontierCompatibilityModeLimit": "0x118c30",
"maximumExtraDataSize": "0x20",
"tieBreakingGas": false,
"minGasLimit": "0x1388",

View File

@ -3,7 +3,7 @@
"engineName": "Ethash",
"params": {
"accountStartNonce": "0x00",
"frontierCompatibilityModeLimit": "0x10c8e0",
"frontierCompatibilityModeLimit": "0x118c30",
"maximumExtraDataSize": "0x20",
"tieBreakingGas": false,
"minGasLimit": "0x1388",

View File

@ -115,7 +115,7 @@ declare_test!{StateTests_stSolidityTest, "StateTests/stSolidityTest"}
declare_test!{StateTests_stSpecialTest, "StateTests/stSpecialTest"}
declare_test!{StateTests_stSystemOperationsTest, "StateTests/stSystemOperationsTest"}
declare_test!{StateTests_stTransactionTest, "StateTests/stTransactionTest"}
declare_test!{StateTests_stTransitionTest, "StateTests/stTransitionTest"}
//declare_test!{StateTests_stTransitionTest, "StateTests/stTransitionTest"}
declare_test!{StateTests_stWalletTest, "StateTests/stWalletTest"}

View File

@ -245,8 +245,8 @@ impl ChainSync {
start_block_number: self.starting_block,
last_imported_block_number: self.last_imported_block,
highest_block_number: self.highest_block,
blocks_received: match self.last_imported_block { None => 0, Some(x) => x - self.starting_block },
blocks_total: match self.highest_block { None => 0, Some(x) => x - self.starting_block },
blocks_received: match self.last_imported_block { Some(x) if x > self.starting_block => x - self.starting_block, _ => 0 },
blocks_total: match self.highest_block { Some(x) if x > self.starting_block => x - self.starting_block, _ => 0 },
num_peers: self.peers.len(),
num_active_peers: self.peers.values().filter(|p| p.asking != PeerAsking::Nothing).count(),
mem_used:

View File

@ -39,7 +39,7 @@ target_info = "0.1"
[features]
default = []
dev = ["clippy"]
x64asm = []
[build-dependencies]
vergen = "*"
rustc_version = "0.1"

View File

@ -1,6 +1,13 @@
extern crate vergen;
extern crate rustc_version;
use vergen::*;
use rustc_version::{version_meta, Channel};
fn main() {
vergen(OutputFns::all()).unwrap();
if let Channel::Nightly = version_meta().channel {
println!("cargo:rustc-cfg=x64asm");
}
}

View File

@ -16,7 +16,7 @@
#![warn(missing_docs)]
#![cfg_attr(feature="dev", feature(plugin))]
#![cfg_attr(feature="x64asm", feature(asm))]
#![cfg_attr(x64asm, feature(asm))]
#![cfg_attr(feature="dev", plugin(clippy))]
// Clippy settings

View File

@ -51,7 +51,7 @@ macro_rules! impl_map_from {
}
}
#[cfg(not(all(feature="x64asm", target_arch="x86_64")))]
#[cfg(not(all(x64asm, target_arch="x86_64")))]
macro_rules! uint_overflowing_add {
($name:ident, $n_words:expr, $self_expr: expr, $other: expr) => ({
uint_overflowing_add_reg!($name, $n_words, $self_expr, $other)
@ -89,7 +89,7 @@ macro_rules! uint_overflowing_add_reg {
}
#[cfg(all(feature="x64asm", target_arch="x86_64"))]
#[cfg(all(x64asm, target_arch="x86_64"))]
macro_rules! uint_overflowing_add {
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
let mut result: [u64; 4] = unsafe { mem::uninitialized() };
@ -165,7 +165,7 @@ macro_rules! uint_overflowing_add {
)
}
#[cfg(not(all(feature="x64asm", target_arch="x86_64")))]
#[cfg(not(all(x64asm, target_arch="x86_64")))]
macro_rules! uint_overflowing_sub {
($name:ident, $n_words: expr, $self_expr: expr, $other: expr) => ({
let res = overflowing!((!$other).overflowing_add(From::from(1u64)));
@ -174,7 +174,7 @@ macro_rules! uint_overflowing_sub {
})
}
#[cfg(all(feature="x64asm", target_arch="x86_64"))]
#[cfg(all(x64asm, target_arch="x86_64"))]
macro_rules! uint_overflowing_sub {
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
let mut result: [u64; 4] = unsafe { mem::uninitialized() };
@ -250,7 +250,7 @@ macro_rules! uint_overflowing_sub {
})
}
#[cfg(all(feature="x64asm", target_arch="x86_64"))]
#[cfg(all(x64asm, target_arch="x86_64"))]
macro_rules! uint_overflowing_mul {
(U256, $n_words: expr, $self_expr: expr, $other: expr) => ({
let mut result: [u64; 4] = unsafe { mem::uninitialized() };
@ -370,7 +370,7 @@ macro_rules! uint_overflowing_mul {
)
}
#[cfg(not(all(feature="x64asm", target_arch="x86_64")))]
#[cfg(not(all(x64asm, target_arch="x86_64")))]
macro_rules! uint_overflowing_mul {
($name:ident, $n_words: expr, $self_expr: expr, $other: expr) => ({
uint_overflowing_mul_reg!($name, $n_words, $self_expr, $other)