Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

process generated transactions #227

Conversation

wanderingbort
Copy link
Contributor

resolves #174

test cases will be easier to write and more meaningful once there is contract support for sync and async transactions. However I wanted to go ahead and review what was working without impacting the existing code/tests.

template<>
void check_output(const types::Message& expected, const types::Message& actual) {
try {
check_output(expected.code, actual.code);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you move the try{ } catch{} . into check_output and pass the "in .x" as a const char* 3rd argument? I think it would make the code more readable.

/**
* clear all common data
*/
inline
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put inline on same line as return statement.

types::transfer{sender, recipient, amount});
auto info = get_info();
trx.expiration = info.head_block_time + 100; //chain.head_block_time() + 100;
trx.set_reference_block(info.head_block_id);
transaction_helpers::set_reference_block(trx, info.head_block_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the name transaction_helpers long, I feel we should say "using transaction_helpers" unless there is clear possibility of name conflict.

@@ -1116,9 +1117,9 @@ R"(
trx.messages.resize(1);
trx.messages[0].code = config::EosContractName;
trx.messages[0].authorization.emplace_back(types::AccountPermission{"simplecoin","active"});
trx.setMessage(0, "setcode", handler);
transaction_helpers::set_message(trx, 0, "setcode", handler);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps renaming the methods . transaction_set_message rather than transaction_helpers::set_message if we are going to be verbose everywhere. If follows the naming convention one would use for a object-oriented C api.

@bytemaster bytemaster merged commit 9efdcbf into EOSIO:master Aug 25, 2017
This was referenced Aug 25, 2017
heipacker pushed a commit to TP-Lab/eos that referenced this pull request Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Process Generated Transactions
2 participants