mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 10:27:59 +00:00
Fix most tests, introduce split-block processing tools for authoring.
This commit is contained in:
@@ -292,9 +292,9 @@ mod tests {
|
||||
use rustc_hex::FromHex;
|
||||
use primitives::{blake2_256, twox_128};
|
||||
use runtime_std::{self, TestExternalities};
|
||||
use native_runtime::support::{one, two, StaticHexInto};
|
||||
use native_runtime::primitives::AccountID;
|
||||
use native_runtime::codec::KeyedVec;
|
||||
use native_runtime::support::{one, two};
|
||||
use native_runtime::primitives::{UncheckedTransaction, AccountID};
|
||||
use native_runtime::codec::{Joiner, KeyedVec};
|
||||
use native_runtime::runtime::staking::balance;
|
||||
|
||||
#[test]
|
||||
@@ -412,7 +412,7 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
fn tx() -> Vec<u8> {
|
||||
fn tx() -> UncheckedTransaction {
|
||||
use native_runtime::codec::{Joiner, Slicable};
|
||||
use native_runtime::support::{one, two};
|
||||
use native_runtime::primitives::*;
|
||||
@@ -425,7 +425,7 @@ mod tests {
|
||||
let signature = secret_for(&transaction.signed).unwrap()
|
||||
.sign(&transaction.to_vec())
|
||||
.inner();
|
||||
UncheckedTransaction { transaction, signature }.to_vec()
|
||||
UncheckedTransaction { transaction, signature }
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -436,7 +436,7 @@ mod tests {
|
||||
], };
|
||||
|
||||
let foreign_code = include_bytes!("../../wasm-runtime/target/wasm32-unknown-unknown/release/runtime_polkadot.wasm");
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &CallData(tx()));
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &CallData(vec![].join(&1u64).join(&tx())));
|
||||
assert!(r.is_err());
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ mod tests {
|
||||
], };
|
||||
|
||||
let foreign_code = include_bytes!("../../wasm-runtime/target/wasm32-unknown-unknown/release/runtime_polkadot.compact.wasm");
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &CallData(tx()));
|
||||
let r = WasmExecutor.call(&mut t, &foreign_code[..], "execute_transaction", &CallData(vec![].join(&1u64).join(&tx())));
|
||||
assert!(r.is_ok());
|
||||
|
||||
runtime_std::with_externalities(&mut t, || {
|
||||
|
||||
Reference in New Issue
Block a user