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
@@ -17,7 +17,6 @@
//! Block Builder extensions for tests.
use client;
use super::AccountKeyring;
use runtime;
use runtime_primitives::traits::ProvideRuntimeApi;
use client::block_builder::api::BlockBuilder;
@@ -33,13 +32,6 @@ impl<'a, A> BlockBuilderExt for client::block_builder::BlockBuilder<'a, runtime:
A::Api: BlockBuilder<runtime::Block>
{
fn push_transfer(&mut self, transfer: runtime::Transfer) -> Result<(), client::error::Error> {
self.push(sign_tx(transfer))
self.push(transfer.into_signed_tx())
}
}
fn sign_tx(transfer: runtime::Transfer) -> runtime::Extrinsic {
let signature = AccountKeyring::from_public(&transfer.from)
.unwrap()
.sign(&parity_codec::Encode::encode(&transfer));
runtime::Extrinsic::Transfer(transfer, signature)
}