Initial (non-functional) code.

- Kill Externalities Error type requirement.
This commit is contained in:
Gav committed 2018-01-23 17:27:43 +01:00
1 parent 68bdf72de7
commit 8ca5c09961
10 files changed
+72 -30

No files matched your search

@@ -16,7 +16,7 @@
//! Testing helpers.
use runtime_support::{NoError, Externalities};
use runtime_support::{Externalities, ExternalitiesError};
use std::collections::HashMap;
use primitives::AccountID;
use statichex::StaticHexInto;
@@ -29,9 +29,7 @@ pub struct TestExternalities {
}
impl Externalities for TestExternalities {
type Error = NoError;
fn storage(&self, key: &[u8]) -> Result<&[u8], NoError> {
fn storage(&self, key: &[u8]) -> Result<&[u8], ExternalitiesError> {
Ok(self.storage.get(&key.to_vec()).map_or(&[] as &[u8], Vec::as_slice))
}