Skip to content
Snippets Groups Projects
Commit 4f15a6d4 authored by Gav's avatar Gav
Browse files

More tests fixed.

parent 89d86868
Branches
No related merge requests found
......@@ -1019,6 +1019,7 @@ name = "polkadot-collator"
version = "0.1.0"
dependencies = [
"futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
"polkadot-primitives 0.1.0",
"substrate-primitives 0.1.0",
]
......
......@@ -6,4 +6,5 @@ description = "Abstract collation logic"
[dependencies]
substrate-primitives = { path = "../primitives", version = "0.1" }
polkadot-primitives = { path = "../polkadot-primitives", version = "0.1" }
futures = "0.1.17"
......@@ -46,11 +46,12 @@
extern crate futures;
extern crate substrate_primitives as primitives;
extern crate polkadot_primitives;
use std::collections::{BTreeSet, BTreeMap};
use futures::{stream, Stream, Future, IntoFuture};
use primitives::parachain::{self, ConsolidatedIngress, Message, Id as ParaId};
use polkadot_primitives::parachain::{self, ConsolidatedIngress, Message, Id as ParaId};
/// Parachain context needed for collation.
///
......@@ -60,7 +61,7 @@ pub trait ParachainContext {
fn produce_candidate<I: IntoIterator<Item=(ParaId, Message)>>(
&self,
ingress: I,
) -> (parachain::BlockData, ::Signature);
) -> (parachain::BlockData, polkadot_primitives::Signature);
}
/// Relay chain context needed to collate.
......@@ -150,7 +151,7 @@ mod tests {
use std::collections::{HashMap, BTreeSet};
use futures::Future;
use primitives::parachain::{Message, Id as ParaId};
use polkadot_primitives::parachain::{Message, Id as ParaId};
pub struct DummyRelayChainCtx {
egresses: HashMap<ParaId, Vec<Vec<Message>>>,
......
......@@ -168,7 +168,6 @@ mod tests {
use super::*;
use codec::Slicable;
use substrate_serializer as ser;
use primitives::hexdisplay::HexDisplay;
#[test]
fn test_header_serialization() {
......
......@@ -286,10 +286,6 @@ pub struct Transaction {
impl Slicable for Transaction {
fn from_slice(value: &mut &[u8]) -> Option<Self> {
// This is a little more complicated than usua since the binary format must be compatible
// with substrate's generic `Vec<u8>` type. Basically this just means accepting that there
// will be a prefix of u32, which has the total number of bytes following (we don't need
// to use this).
Some(Transaction {
signed: try_opt!(Slicable::from_slice(value)),
nonce: try_opt!(Slicable::from_slice(value)),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment