Cleanup of the state-machine crate (#3524)

* Start refactoring state-machine crate

* More improvement to state-machine

* Fix tests compilation on master and remove warnings

* Fix compilation

* Apply suggestions from code review

Co-Authored-By: Sergei Pepyakin <sergei@parity.io>

* Update core/state-machine/src/basic.rs

Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>

* Line width

* Update core/primitives/src/storage.rs

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Update core/state-machine/src/error.rs

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Review feedback
This commit is contained in:
Bastian Köcher
2019-09-10 17:00:00 +02:00
committed by GitHub
parent 2beeda1488
commit 9607afd629
37 changed files with 781 additions and 674 deletions
+9 -6
View File
@@ -40,10 +40,13 @@ mod tests {
use runtime_io;
use substrate_executor::WasmExecutor;
use codec::{Encode, Decode, Joiner};
use runtime_support::{Hashable, StorageValue, StorageMap, assert_eq_error_rate, traits::Currency};
use state_machine::{CodeExecutor, Externalities, TestExternalities as CoreTestExternalities};
use primitives::{Blake2Hasher, NeverNativeValue, NativeOrEncoded, map};
use node_primitives::{Hash, BlockNumber, Balance};
use runtime_support::{
Hashable, StorageValue, StorageMap, assert_eq_error_rate, traits::Currency,
};
use state_machine::TestExternalities as CoreTestExternalities;
use primitives::{
Blake2Hasher, NeverNativeValue, NativeOrEncoded, map, traits::{CodeExecutor, Externalities},
};
use sr_primitives::{
traits::{Header as HeaderT, Hash as HashT, Convert}, ApplyOutcome, ApplyResult,
transaction_validity::InvalidTransaction, weights::{WeightMultiplier, GetDispatchInfo},
@@ -53,9 +56,9 @@ mod tests {
use node_runtime::{
Header, Block, UncheckedExtrinsic, CheckedExtrinsic, Call, Runtime, Balances, BuildStorage,
System, Event, TransferFee, TransactionBaseFee, TransactionByteFee,
constants::currency::*, impls::WeightToFee,
};
use node_runtime::constants::currency::*;
use node_runtime::impls::WeightToFee;
use node_primitives::{Balance, Hash, BlockNumber};
use node_testing::keyring::*;
use wabt;