mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Migrate tx-graph, tx-pool and trie to the 2018 edition (#1611)
This commit is contained in:
committed by
Gav Wood
parent
e6839d2d41
commit
d796e09f02
@@ -21,12 +21,14 @@ use std::{
|
||||
time,
|
||||
};
|
||||
|
||||
use base_pool as base;
|
||||
use error;
|
||||
use listener::Listener;
|
||||
use rotator::PoolRotator;
|
||||
use watcher::Watcher;
|
||||
use crate::base_pool as base;
|
||||
use crate::error;
|
||||
use crate::listener::Listener;
|
||||
use crate::rotator::PoolRotator;
|
||||
use crate::watcher::Watcher;
|
||||
use serde::Serialize;
|
||||
use error_chain::bail;
|
||||
use log::debug;
|
||||
|
||||
use futures::sync::mpsc;
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
@@ -394,6 +396,8 @@ mod tests {
|
||||
use super::*;
|
||||
use futures::Stream;
|
||||
use test_runtime::{Block, Extrinsic, Transfer, H256};
|
||||
use assert_matches::assert_matches;
|
||||
use crate::watcher;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct TestApi;
|
||||
@@ -606,8 +610,8 @@ mod tests {
|
||||
|
||||
// then
|
||||
let mut stream = watcher.into_stream().wait();
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Finalised(H256::from_low_u64_be(2)))));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Finalised(H256::from_low_u64_be(2)))));
|
||||
assert_eq!(stream.next(), None);
|
||||
}
|
||||
|
||||
@@ -631,8 +635,8 @@ mod tests {
|
||||
|
||||
// then
|
||||
let mut stream = watcher.into_stream().wait();
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Finalised(H256::from_low_u64_be(2)))));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Finalised(H256::from_low_u64_be(2)))));
|
||||
assert_eq!(stream.next(), None);
|
||||
}
|
||||
|
||||
@@ -660,8 +664,8 @@ mod tests {
|
||||
|
||||
// then
|
||||
let mut stream = watcher.into_stream().wait();
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Future)));
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Future)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Ready)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -683,8 +687,8 @@ mod tests {
|
||||
|
||||
// then
|
||||
let mut stream = watcher.into_stream().wait();
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Invalid)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Invalid)));
|
||||
assert_eq!(stream.next(), None);
|
||||
}
|
||||
|
||||
@@ -710,8 +714,8 @@ mod tests {
|
||||
|
||||
// then
|
||||
let mut stream = watcher.into_stream().wait();
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(::watcher::Status::Broadcast(peers))));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Ready)));
|
||||
assert_eq!(stream.next(), Some(Ok(watcher::Status::Broadcast(peers))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user