mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 20:47:56 +00:00
Fix MultiSigner, simplify tests (#2033)
* Fix MultiSigner, use `into_signed_tx` * Rebuild.
This commit is contained in:
committed by
Gavin Wood
parent
b483c5608f
commit
08fda211d8
@@ -46,7 +46,7 @@ mod tests {
|
||||
use state_machine::backend::InMemory;
|
||||
use test_client::{
|
||||
runtime::genesismap::{GenesisConfig, additional_storage_with_genesis},
|
||||
runtime::{Hash, Transfer, Block, BlockNumber, Header, Digest, Extrinsic},
|
||||
runtime::{Hash, Transfer, Block, BlockNumber, Header, Digest},
|
||||
AccountKeyring, AuthorityKeyring
|
||||
};
|
||||
use runtime_primitives::traits::BlakeTwo256;
|
||||
@@ -68,12 +68,7 @@ mod tests {
|
||||
) -> (Vec<u8>, Hash) {
|
||||
use trie::ordered_trie_root;
|
||||
|
||||
let transactions = txs.into_iter().map(|tx| {
|
||||
let signature = AccountKeyring::from_public(&tx.from).unwrap()
|
||||
.sign(&tx.encode()).into();
|
||||
|
||||
Extrinsic::Transfer(tx, signature)
|
||||
}).collect::<Vec<_>>();
|
||||
let transactions = txs.into_iter().map(|tx| tx.into_signed_tx()).collect::<Vec<_>>();
|
||||
|
||||
let extrinsics_root = ordered_trie_root::<Blake2Hasher, _, _>(transactions.iter().map(Encode::encode)).into();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user