fix warnings
This commit is contained in:
parent
326e1b3a42
commit
9e7968c92e
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Flat trace module
|
||||||
|
|
||||||
use trace::BlockTraces;
|
use trace::BlockTraces;
|
||||||
use super::trace::{Trace, Action, Res};
|
use super::trace::{Trace, Action, Res};
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Blockhain info type definition
|
||||||
|
|
||||||
use util::numbers::*;
|
use util::numbers::*;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use ipc::binary::BinaryConvertError;
|
use ipc::binary::BinaryConvertError;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
use util::hash::H256;
|
use util::hash::H256;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use util::bytes::{FromRawBytes, FromBytesError, ToBytesWithMap, Populatable};
|
|
||||||
|
|
||||||
/// Uniquely identifies block.
|
/// Uniquely identifies block.
|
||||||
#[derive(Debug, PartialEq, Clone, Hash, Eq)]
|
#[derive(Debug, PartialEq, Clone, Hash, Eq)]
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Block log.
|
//! Log entry type definition.
|
||||||
|
|
||||||
use util::numbers::*;
|
use util::numbers::*;
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
@ -17,18 +17,14 @@
|
|||||||
//! Receipt
|
//! Receipt
|
||||||
|
|
||||||
use util::numbers::*;
|
use util::numbers::*;
|
||||||
use std::ops::Deref;
|
|
||||||
use util::rlp::*;
|
use util::rlp::*;
|
||||||
use util::Bytes;
|
|
||||||
use util::HeapSizeOf;
|
use util::HeapSizeOf;
|
||||||
use util::sha3::*;
|
|
||||||
use basic_types::LogBloom;
|
use basic_types::LogBloom;
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
use log_entry::{LogEntry, LocalizedLogEntry};
|
use log_entry::{LogEntry, LocalizedLogEntry};
|
||||||
use ipc::binary::BinaryConvertError;
|
use ipc::binary::BinaryConvertError;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use rustc_serialize::hex::FromHex;
|
|
||||||
|
|
||||||
/// Information describing execution of a transaction.
|
/// Information describing execution of a transaction.
|
||||||
#[derive(Default, Debug, Clone, Binary)]
|
#[derive(Default, Debug, Clone, Binary)]
|
||||||
@ -107,7 +103,7 @@ pub struct LocalizedReceipt {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_basic() {
|
fn test_basic() {
|
||||||
let expected = FromHex::from_hex("f90162a02f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee83040caeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000f838f794dcf421d093428b096ca501a7cd1a740855a7976fc0a00000000000000000000000000000000000000000000000000000000000000000").unwrap();
|
let expected = ::rustc_serialize::hex::FromHex::from_hex("f90162a02f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee83040caeb9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000f838f794dcf421d093428b096ca501a7cd1a740855a7976fc0a00000000000000000000000000000000000000000000000000000000000000000").unwrap();
|
||||||
let r = Receipt::new(
|
let r = Receipt::new(
|
||||||
x!("2f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee"),
|
x!("2f697d671e9ae4ee24a43c4b0d7e15f1cb4ba6de1561120d43b9a4e8c4a8a6ee"),
|
||||||
x!(0x40cae),
|
x!(0x40cae),
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Trace filters type definitions
|
||||||
|
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
use bloomchain::{Filter as BloomFilter, Bloom, Number};
|
use bloomchain::{Filter as BloomFilter, Bloom, Number};
|
||||||
use util::{Address, FixedHash};
|
use util::{Address, FixedHash};
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Localized traces type definitions
|
||||||
|
|
||||||
use util::H256;
|
use util::H256;
|
||||||
use super::trace::{Action, Res};
|
use super::trace::{Action, Res};
|
||||||
use header::BlockNumber;
|
use header::BlockNumber;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
//! Tracing datatypes.
|
//! Tracing datatypes.
|
||||||
|
|
||||||
use util::{U256, Bytes, Address, FixedHash};
|
use util::{U256, Bytes, Address, FixedHash};
|
||||||
use util::rlp::*;
|
use util::rlp::*;
|
||||||
use util::sha3::Hashable;
|
use util::sha3::Hashable;
|
||||||
|
@ -20,7 +20,7 @@ use util::numbers::*;
|
|||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use util::rlp::*;
|
use util::rlp::*;
|
||||||
use util::sha3::*;
|
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 std::cell::*;
|
||||||
use error::*;
|
use error::*;
|
||||||
use evm::Schedule;
|
use evm::Schedule;
|
||||||
@ -29,8 +29,6 @@ use ethjson;
|
|||||||
use ipc::binary::BinaryConvertError;
|
use ipc::binary::BinaryConvertError;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
use rustc_serialize::hex::FromHex;
|
|
||||||
use util::crypto::KeyPair;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Binary)]
|
#[derive(Debug, Clone, PartialEq, Eq, Binary)]
|
||||||
/// Transaction action type.
|
/// Transaction action type.
|
||||||
@ -320,7 +318,7 @@ impl SignedTransaction {
|
|||||||
}
|
}
|
||||||
try!(self.sender());
|
try!(self.sender());
|
||||||
if self.gas < U256::from(self.gas_required(&schedule)) {
|
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 {
|
} else {
|
||||||
Ok(self)
|
Ok(self)
|
||||||
}
|
}
|
||||||
@ -350,7 +348,7 @@ impl Deref for LocalizedTransaction {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn sender_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.data, b"");
|
||||||
assert_eq!(t.gas, U256::from(0x5208u64));
|
assert_eq!(t.gas, U256::from(0x5208u64));
|
||||||
assert_eq!(t.gas_price, U256::from(0x01u64));
|
assert_eq!(t.gas_price, U256::from(0x01u64));
|
||||||
@ -364,7 +362,7 @@ fn sender_test() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn signing() {
|
fn signing() {
|
||||||
let key = KeyPair::create().unwrap();
|
let key = ::util::crypto::KeyPair::create().unwrap();
|
||||||
let t = Transaction {
|
let t = Transaction {
|
||||||
action: Action::Create,
|
action: Action::Create,
|
||||||
nonce: U256::from(42),
|
nonce: U256::from(42),
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
//! Tree route info type definition
|
||||||
|
|
||||||
use util::numbers::H256;
|
use util::numbers::H256;
|
||||||
|
|
||||||
/// Represents a tree route between `from` block and `to` block:
|
/// Represents a tree route between `from` block and `to` block:
|
||||||
|
Loading…
Reference in New Issue
Block a user