Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
trace.hpp
Go to the documentation of this file.
1#pragma once
2
6
7namespace sysio { namespace chain {
8
9 struct account_delta {
10 account_delta( const account_name& n, int64_t d):account(n),delta(d){}
12
15
16 friend bool operator<( const account_delta& lhs, const account_delta& rhs ) { return lhs.account < rhs.account; }
17 };
18
19 struct transaction_trace;
20 using transaction_trace_ptr = std::shared_ptr<transaction_trace>;
21
49
54 std::optional<block_id_type> producer_block_id;
55 std::optional<transaction_receipt_header> receipt;
58 bool scheduled = false;
60 std::optional<account_delta> account_ram_delta;
61
63 std::optional<fc::exception> except;
64 std::optional<uint64_t> error_code;
65 std::exception_ptr except_ptr;
66 };
67
71 inline bool is_onblock( const transaction_trace& tt ) {
72 if (tt.action_traces.empty())
73 return false;
74 const auto& act = tt.action_traces[0].act;
75 if (act.account != sysio::chain::config::system_account_name || act.name != "onblock"_n ||
76 act.authorization.size() != 1)
77 return false;
78 const auto& auth = act.authorization[0];
79 return auth.actor == sysio::chain::config::system_account_name &&
80 auth.permission == sysio::chain::config::active_name;
81 }
82
83} }
84
86 (account)(delta) )
87
89 (action_ordinal)(creator_action_ordinal)(closest_unnotified_ancestor_action_ordinal)(receipt)
90 (receiver)(act)(context_free)(elapsed)(console)(trx_id)(block_num)(block_time)
91 (producer_block_id)(account_ram_deltas)(except)(error_code)(return_value) )
92
93// @ignore except_ptr
94FC_REFLECT( sysio::chain::transaction_trace, (id)(block_num)(block_time)(producer_block_id)
95 (receipt)(elapsed)(net_usage)(scheduled)
96 (action_traces)(account_ram_delta)(failed_dtrx_trace)(except)(error_code) )
std::shared_ptr< transaction_trace > transaction_trace_ptr
Definition trace.hpp:20
sysio::chain::action_name action_name
bool is_onblock(const transaction_trace &tt)
Definition trace.hpp:71
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311
signed __int64 int64_t
Definition stdint.h:135
unsigned int uint32_t
Definition stdint.h:126
unsigned __int64 uint64_t
Definition stdint.h:136
account_delta(const account_name &n, int64_t d)
Definition trace.hpp:10
friend bool operator<(const account_delta &lhs, const account_delta &rhs)
Definition trace.hpp:16
std::optional< block_id_type > producer_block_id
Definition trace.hpp:43
fc::microseconds elapsed
Definition trace.hpp:38
block_timestamp_type block_time
Definition trace.hpp:42
fc::unsigned_int creator_action_ordinal
Definition trace.hpp:32
std::optional< fc::exception > except
Definition trace.hpp:45
fc::unsigned_int closest_unnotified_ancestor_action_ordinal
Definition trace.hpp:33
flat_set< account_delta > account_ram_deltas
Definition trace.hpp:44
fc::unsigned_int action_ordinal
Definition trace.hpp:31
transaction_id_type trx_id
the transaction that generated this action
Definition trace.hpp:40
std::vector< char > return_value
Definition trace.hpp:47
std::optional< action_receipt > receipt
Definition trace.hpp:34
std::optional< uint64_t > error_code
Definition trace.hpp:46
Immutable except for fc::from_variant.
Definition name.hpp:43
name(std::string_view str)
Definition name.hpp:56
std::optional< fc::exception > except
Definition trace.hpp:63
std::optional< transaction_receipt_header > receipt
Definition trace.hpp:55
transaction_id_type id
Definition trace.hpp:51
fc::microseconds elapsed
Definition trace.hpp:56
block_timestamp_type block_time
Definition trace.hpp:53
transaction_trace_ptr failed_dtrx_trace
Definition trace.hpp:62
std::optional< account_delta > account_ram_delta
Definition trace.hpp:60
std::optional< block_id_type > producer_block_id
Definition trace.hpp:54
vector< action_trace > action_traces
Definition trace.hpp:59
std::optional< uint64_t > error_code
Definition trace.hpp:64
std::exception_ptr except_ptr
Definition trace.hpp:65
CK_ULONG d