fix warnings

This commit is contained in:
Nikolay Volf 2016-05-15 02:13:45 +03:00
parent 326e1b3a42
commit 9e7968c92e
10 changed files with 17 additions and 13 deletions

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Flat trace module
use trace::BlockTraces;
use super::trace::{Trace, Action, Res};

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Blockhain info type definition
use util::numbers::*;
use header::BlockNumber;
use ipc::binary::BinaryConvertError;

View File

@ -18,7 +18,6 @@
use util::hash::H256;
use header::BlockNumber;
use util::bytes::{FromRawBytes, FromBytesError, ToBytesWithMap, Populatable};
/// Uniquely identifies block.
#[derive(Debug, PartialEq, Clone, Hash, Eq)]

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Block log.
//! Log entry type definition.
use util::numbers::*;
use std::ops::Deref;

View File

@ -17,18 +17,14 @@
//! Receipt
use util::numbers::*;
use std::ops::Deref;
use util::rlp::*;
use util::Bytes;
use util::HeapSizeOf;
use util::sha3::*;
use basic_types::LogBloom;
use header::BlockNumber;
use log_entry::{LogEntry, LocalizedLogEntry};
use ipc::binary::BinaryConvertError;
use std::mem;
use std::collections::VecDeque;
use rustc_serialize::hex::FromHex;
/// Information describing execution of a transaction.
#[derive(Default, Debug, Clone, Binary)]
@ -107,7 +103,7 @@ pub struct LocalizedReceipt {
#[test]
fn test_basic() {
let expected = FromHex::from_hex("f90162a02f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee83040caeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000f838f794dcf421d093428b096ca501a7cd1a740855a7976fc0a00000000000000000000000000000000000000000000000000000000000000000").unwrap();
let expected = ::rustc_serialize::hex::FromHex::from_hex("f90162a02f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee83040caeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000f838f794dcf421d093428b096ca501a7cd1a740855a7976fc0a00000000000000000000000000000000000000000000000000000000000000000").unwrap();
let r = Receipt::new(
x!("2f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee"),
x!(0x40cae),

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Trace filters type definitions
use std::ops::Range;
use bloomchain::{Filter as BloomFilter, Bloom, Number};
use util::{Address, FixedHash};

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Localized traces type definitions
use util::H256;
use super::trace::{Action, Res};
use header::BlockNumber;

View File

@ -15,6 +15,7 @@
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Tracing datatypes.
use util::{U256, Bytes, Address, FixedHash};
use util::rlp::*;
use util::sha3::Hashable;

View File

@ -20,7 +20,7 @@ use util::numbers::*;
use std::ops::Deref;
use util::rlp::*;
use util::sha3::*;
use util::{UtilError, CryptoError, Bytes, HeapSizeOf, Signature, Secret, ec, OutOfBounds};
use util::{UtilError, CryptoError, Bytes, Signature, Secret, ec};
use std::cell::*;
use error::*;
use evm::Schedule;
@ -29,8 +29,6 @@ use ethjson;
use ipc::binary::BinaryConvertError;
use std::mem;
use std::collections::VecDeque;
use rustc_serialize::hex::FromHex;
use util::crypto::KeyPair;
#[derive(Debug, Clone, PartialEq, Eq, Binary)]
/// Transaction action type.
@ -320,7 +318,7 @@ impl SignedTransaction {
}
try!(self.sender());
if self.gas < U256::from(self.gas_required(&schedule)) {
Err(From::from(TransactionError::InvalidGasLimit(OutOfBounds{min: Some(U256::from(self.gas_required(&schedule))), max: None, found: self.gas})))
Err(From::from(TransactionError::InvalidGasLimit(::util::OutOfBounds{min: Some(U256::from(self.gas_required(&schedule))), max: None, found: self.gas})))
} else {
Ok(self)
}
@ -350,7 +348,7 @@ impl Deref for LocalizedTransaction {
#[test]
fn sender_test() {
let t: SignedTransaction = decode(&FromHex::from_hex("f85f800182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804").unwrap());
let t: SignedTransaction = decode(&::rustc_serialize::hex::FromHex::from_hex("f85f800182520894095e7baea6a6c7c4c2dfeb977efac326af552d870a801ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804").unwrap());
assert_eq!(t.data, b"");
assert_eq!(t.gas, U256::from(0x5208u64));
assert_eq!(t.gas_price, U256::from(0x01u64));
@ -364,7 +362,7 @@ fn sender_test() {
#[test]
fn signing() {
let key = KeyPair::create().unwrap();
let key = ::util::crypto::KeyPair::create().unwrap();
let t = Transaction {
action: Action::Create,
nonce: U256::from(42),

View File

@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
//! Tree route info type definition
use util::numbers::H256;
/// Represents a tree route between `from` block and `to` block: