Skip to content
Snippets Groups Projects
Commit bde4152f authored by Gav Wood's avatar Gav Wood Committed by GitHub
Browse files

Remove _wasm block specialistions in tests. (#576)

parent d0066e51
Branches
No related merge requests found
......@@ -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);
......
No preview for this file type
No preview for this file type
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment