Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.1 -> main] Bring GH-651 and GH-646 into main #669

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions libraries/chain/deep_mind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,23 @@ namespace eosio::chain {
("trx", fc::to_hex(gto.packed_trx.data(), gto.packed_trx.size()))
);
}
void deep_mind_handler::on_create_deferred(operation_qualifier qual, const generated_transaction_object& gto, const packed_transaction& packed_trx)
{
auto packed_signed_trx = fc::raw::pack(packed_trx.get_signed_transaction());

fc_dlog(_logger, "DTRX_OP ${qual}CREATE ${action_id} ${sender} ${sender_id} ${payer} ${published} ${delay} ${expiration} ${trx_id} ${trx}",
("qual", prefix(qual))
("action_id", _action_id)
("sender", gto.sender)
("sender_id", gto.sender_id)
("payer", gto.payer)
("published", gto.published)
("delay", gto.delay_until)
("expiration", gto.expiration)
("trx_id", gto.trx_id)
("trx", fc::to_hex(packed_signed_trx.data(), packed_signed_trx.size()))
);
}
void deep_mind_handler::on_fail_deferred()
{
fc_dlog(_logger, "DTRX_OP FAILED ${action_id}",
Expand Down
2 changes: 2 additions & 0 deletions libraries/chain/include/eosio/chain/deep_mind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class permission_object;
struct block_state;
struct protocol_feature;
struct signed_transaction;
struct packed_transaction;
struct transaction_trace;
struct ram_trace;
namespace resource_limits {
Expand Down Expand Up @@ -72,6 +73,7 @@ class deep_mind_handler
void on_send_context_free_inline();
void on_cancel_deferred(operation_qualifier qual, const generated_transaction_object& gto);
void on_send_deferred(operation_qualifier qual, const generated_transaction_object& gto);
void on_create_deferred(operation_qualifier qual, const generated_transaction_object& gto, const packed_transaction& packed_trx);
void on_fail_deferred();
void on_create_table(const table_id_object& tid);
void on_remove_table(const table_id_object& tid);
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/transaction_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ namespace eosio { namespace chain {
if (auto dm_logger = control.get_deep_mind_logger()) {
std::string event_id = RAM_EVENT_ID("${id}", ("id", gto.id));

dm_logger->on_send_deferred(deep_mind_handler::operation_qualifier::push, gto);
dm_logger->on_create_deferred(deep_mind_handler::operation_qualifier::push, gto, packed_trx);
dm_logger->on_ram_trace(std::move(event_id), "deferred_trx", "push", "deferred_trx_pushed");
}
});
Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
Submodule fc updated 1 files
+2 −0 src/io/fstream.cpp