Fix MultiSigner, simplify tests (#2033)

* Fix MultiSigner, use `into_signed_tx`

* Rebuild.
This commit is contained in:
Tomasz Drwięga
2019-04-23 18:18:32 +02:00
committed by Gavin Wood
parent b483c5608f
commit 08fda211d8
16 changed files with 101 additions and 46 deletions
+2 -4
View File
@@ -561,9 +561,8 @@ impl<Factory: ServiceFactory> Components for LightComponents<Factory> {
#[cfg(test)]
mod tests {
use super::*;
use parity_codec::Encode;
use consensus_common::BlockOrigin;
use substrate_test_client::{self, TestClient, AccountKeyring, runtime::{Extrinsic, Transfer}};
use substrate_test_client::{self, TestClient, AccountKeyring, runtime::Transfer};
#[test]
fn should_remove_transactions_from_the_pool() {
@@ -576,8 +575,7 @@ mod tests {
from: AccountKeyring::Alice.into(),
to: Default::default(),
};
let signature = AccountKeyring::from_public(&transfer.from).unwrap().sign(&transfer.encode()).into();
Extrinsic::Transfer(transfer, signature)
transfer.into_signed_tx()
};
// store the transaction in the pool
pool.submit_one(&BlockId::hash(client.best_block_header().unwrap().hash()), transaction.clone()).unwrap();