1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Add transaction running elapsed time to emulator response (#616)

This commit is contained in:
Marat 2023-03-07 16:51:09 +00:00 committed by GitHub
parent 5a3e6ec559
commit 6000a2646c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 12 deletions

View file

@ -25,26 +25,27 @@ public:
struct EmulationResult {
std::string vm_log;
double elapsed_time;
EmulationResult(std::string vm_log_) : vm_log(vm_log_) {}
EmulationResult(std::string vm_log_, double elapsed_time_) : vm_log(vm_log_), elapsed_time(elapsed_time_) {}
virtual ~EmulationResult() = default;
};
struct EmulationSuccess: EmulationResult {
td::Ref<vm::Cell> transaction;
block::Account account;
td::Ref<vm::Cell> actions;
td::Ref<vm::Cell> actions;
EmulationSuccess(td::Ref<vm::Cell> transaction_, block::Account account_, std::string vm_log_, td::Ref<vm::Cell> actions_) :
EmulationResult(vm_log_), transaction(transaction_), account(account_) , actions(actions_)
EmulationSuccess(td::Ref<vm::Cell> transaction_, block::Account account_, std::string vm_log_, td::Ref<vm::Cell> actions_, double elapsed_time_) :
EmulationResult(vm_log_, elapsed_time_), transaction(transaction_), account(account_) , actions(actions_)
{}
};
struct EmulationExternalNotAccepted: EmulationResult {
int vm_exit_code;
EmulationExternalNotAccepted(std::string vm_log_, int vm_exit_code_) :
EmulationResult(vm_log_), vm_exit_code(vm_exit_code_)
EmulationExternalNotAccepted(std::string vm_log_, int vm_exit_code_, double elapsed_time_) :
EmulationResult(vm_log_, elapsed_time_), vm_exit_code(vm_exit_code_)
{}
};