Encode Metadata once instead of two times (#946)

This commit is contained in:
Bastian Köcher
2018-10-25 09:36:57 +02:00
committed by Gav Wood
parent 1ba73e0e88
commit 6244b6a3b9
6 changed files with 17 additions and 23 deletions
+3 -3
View File
@@ -81,7 +81,7 @@ pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use runtime_primitives::{Permill, Perbill};
pub use timestamp::BlockPeriod;
pub use srml_support::StorageValue;
pub use srml_support::{StorageValue, RuntimeMetadata};
const TIMESTAMP_SET_POSITION: u32 = 0;
const NOTE_OFFLINE_POSITION: u32 = 1;
@@ -246,8 +246,8 @@ impl_apis! {
}
}
impl Metadata for Runtime {
fn metadata() -> Vec<u8> {
impl Metadata<RuntimeMetadata> for Runtime {
fn metadata() -> RuntimeMetadata {
Runtime::metadata()
}
}