Tests for native/wasm runtime

This commit is contained in:
Gav
2018-01-25 19:28:28 +01:00
parent 53eea2bed6
commit ead42293bc
15 changed files with 105 additions and 32 deletions
@@ -84,6 +84,7 @@ pub fn execute_block(mut block: Block) {
/// Execute a given transaction.
pub fn execute_transaction(utx: &UncheckedTransaction) {
println!("Executing...");
// Verify the signature is good.
assert!(utx.ed25519_verify(), "All transactions should be properly signed");
@@ -97,6 +98,8 @@ pub fn execute_transaction(utx: &UncheckedTransaction) {
// increment nonce in storage
(expected_nonce + 1).store(&nonce_key);
println!("Dispatching...");
// decode parameters and dispatch
tx.function.dispatch(&tx.signed, &tx.input_data);
}