Update some types and interfaces to match the spec (#24)

* Update primitives.

* Fix validator interface.
This commit is contained in:
Tomasz Drwięga
2017-12-04 16:51:43 +01:00
committed by Robert Habermeier
parent d17dcc1893
commit 55e74cd426
9 changed files with 199 additions and 153 deletions
+4 -2
View File
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use primitives::parachain;
use super::*;
use test_helpers::Blockchain;
@@ -26,9 +27,10 @@ fn should_return_header() {
ChainApi::header(&state, 0.into()),
Ok(Some(ref x)) if x == &block::Header {
parent_hash: 0.into(),
state_root: 0.into(),
timestamp: 0,
number: 0,
state_root: 0.into(),
parachain_activity: parachain::Activity(vec![0]),
logs: vec![],
}
);
+4 -3
View File
@@ -15,7 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use client;
use primitives::block;
use primitives::{block, parachain};
/// Temporary dummy blockchain implementation for tests.
#[derive(Debug, Default)]
@@ -33,10 +33,11 @@ impl client::Blockchain for Blockchain {
None
} else {
Some(block::Header {
number: 0,
parent_hash: 0.into(),
number: 0,
state_root: 0.into(),
timestamp: 0,
parachain_activity: parachain::Activity(vec![0]),
logs: vec![],
})
})
}