mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-16 07:15:41 +00:00
Fix everything.
This commit is contained in:
@@ -47,12 +47,9 @@ pub fn execute_block(input: &[u8]) -> Vec<u8> {
|
||||
|
||||
/// Execute a given, serialised, transaction. Returns the empty vector.
|
||||
pub fn execute_transaction(input: &[u8]) -> Vec<u8> {
|
||||
if input.len() == 0 {
|
||||
panic!("no transaction data given!");
|
||||
}
|
||||
let utx = UncheckedTransaction::from_slice(input).unwrap();
|
||||
runtime::system::execute_transaction(&utx);
|
||||
input.to_vec()//Vec::new()
|
||||
Vec::new()
|
||||
}
|
||||
|
||||
impl_stubs!(execute_block, execute_transaction);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
use primitives::{Block, BlockNumber, Hash, UncheckedTransaction, TxOrder, Hashable};
|
||||
use runtime_support::mem;
|
||||
use runtime_support::prelude::*;
|
||||
use runtime_support::print;
|
||||
use storable::Storable;
|
||||
use keyedvec::KeyedVec;
|
||||
use environment::with_env;
|
||||
@@ -84,6 +85,7 @@ pub fn execute_block(mut block: Block) {
|
||||
|
||||
/// Execute a given transaction.
|
||||
pub fn execute_transaction(utx: &UncheckedTransaction) {
|
||||
print(&b"HERE"[..]);
|
||||
// Verify the signature is good.
|
||||
assert!(utx.ed25519_verify(), "All transactions should be properly signed");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user