Update to latest Substrate (#340)

* Update Substrate

* Update Substrate again

* Integrate weight/fee stuff.

* Add new files.
This commit is contained in:
Bastian Köcher
2019-07-26 12:19:41 +02:00
committed by GitHub
parent 86e5b3d0bb
commit 4d5db52ca0
18 changed files with 971 additions and 854 deletions
+2 -14
View File
@@ -20,12 +20,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]
use serde::{Serialize, Deserialize};
use rstd::prelude::*;
use runtime_primitives::{generic, traits::Extrinsic, AnySignature};
use parity_codec::{Encode, Decode};
use runtime_primitives::{generic, AnySignature};
use primitives::ed25519;
pub use runtime_primitives::traits::{BlakeTwo256, Hash as HashT, Verify};
@@ -34,9 +29,6 @@ pub mod parachain;
pub use parity_codec::Compact;
#[cfg(feature = "std")]
use primitives::bytes;
/// An index to a block.
/// 32-bits will allow for 136 years of blocks assuming 1 block per second.
/// TODO: switch to u32 (https://github.com/paritytech/polkadot/issues/221)
@@ -92,8 +84,4 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
pub type BlockId = generic::BlockId<Block>;
/// Opaque, encoded, unchecked extrinsic.
#[derive(PartialEq, Eq, Clone, Default, Encode, Decode)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
pub struct UncheckedExtrinsic(#[cfg_attr(feature = "std", serde(with="bytes"))] pub Vec<u8>);
impl Extrinsic for UncheckedExtrinsic {}
pub use runtime_primitives::OpaqueExtrinsic as UncheckedExtrinsic;