mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Remove _wasm block specialistions in tests. (#576)
This commit is contained in:
@@ -282,39 +282,6 @@ mod tests {
|
||||
)
|
||||
}
|
||||
|
||||
fn block1_wasm() -> (Vec<u8>, Hash) {
|
||||
construct_block(
|
||||
1,
|
||||
[69u8; 32].into(),
|
||||
hex!("b97d52254fc967bb94bed485de6a738e9fad05decfda3453711677b8becf6d0a").into(),
|
||||
vec![BareExtrinsic {
|
||||
signed: alice(),
|
||||
index: 0,
|
||||
function: Call::Staking(staking::Call::transfer(bob().into(), 69)),
|
||||
}]
|
||||
)
|
||||
}
|
||||
|
||||
fn block2_wasm() -> (Vec<u8>, Hash) {
|
||||
construct_block(
|
||||
2,
|
||||
block1().1,
|
||||
hex!("b820fe09935dba41d200b627c11bd7dd9ebff39c319dee18be3ee4f99fc1eab4").into(),
|
||||
vec![
|
||||
BareExtrinsic {
|
||||
signed: bob(),
|
||||
index: 0,
|
||||
function: Call::Staking(staking::Call::transfer(alice().into(), 5)),
|
||||
},
|
||||
BareExtrinsic {
|
||||
signed: alice(),
|
||||
index: 1,
|
||||
function: Call::Staking(staking::Call::transfer(bob().into(), 15)),
|
||||
}
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
fn block1big() -> (Vec<u8>, Hash) {
|
||||
construct_block(
|
||||
1,
|
||||
@@ -354,14 +321,14 @@ mod tests {
|
||||
fn full_wasm_block_import_works() {
|
||||
let mut t = new_test_ext();
|
||||
|
||||
WasmExecutor::new(8).call(&mut t, COMPACT_CODE, "execute_block", &block1_wasm().0).unwrap();
|
||||
WasmExecutor::new(8).call(&mut t, COMPACT_CODE, "execute_block", &block1().0).unwrap();
|
||||
|
||||
runtime_io::with_externalities(&mut t, || {
|
||||
assert_eq!(Staking::voting_balance(&alice()), 41);
|
||||
assert_eq!(Staking::voting_balance(&bob()), 69);
|
||||
});
|
||||
|
||||
WasmExecutor::new(8).call(&mut t, COMPACT_CODE, "execute_block", &block2_wasm().0).unwrap();
|
||||
WasmExecutor::new(8).call(&mut t, COMPACT_CODE, "execute_block", &block2().0).unwrap();
|
||||
|
||||
runtime_io::with_externalities(&mut t, || {
|
||||
assert_eq!(Staking::voting_balance(&alice()), 30);
|
||||
|
||||
Reference in New Issue
Block a user