提交 5138e736 编写于 作者: R root

Fixed aliasing issue on Fedora

上级 96d220ec
......@@ -369,7 +369,8 @@ transaction_trace chain_controller::delayed_transaction_processing( const transa
time_point_sec execute_after = head_block_time();
execute_after += mtrx.delay;
//TODO: !!! WHO GETS BILLED TO STORE THE DELAYED TX?
deferred_transaction dtrx(*reinterpret_cast<const uint128_t*>(trx.id()._hash), config::system_account_name, config::system_account_name, execute_after, trx);
fc::uint128_t _id(trx.id()._hash[3], trx.id()._hash[2]);
deferred_transaction dtrx((unsigned __int128)_id, config::system_account_name, config::system_account_name, execute_after, trx);
FC_ASSERT( dtrx.execute_after < dtrx.expiration, "transaction expires before it can execute" );
result.deferred_transaction_requests.push_back(std::move(dtrx));
......
......@@ -483,8 +483,9 @@ void apply_eosio_postrecovery(apply_context& context) {
.parent = 0,
.data = recover_act.data
}, update);
auto& request_id = *reinterpret_cast<const uint128_t*>(context.trx_meta.id._hash);
const fc::uint128_t _request_id(context.trx_meta.id._hash[3], context.trx_meta.id._hash[2]);
const uint128_t request_id = (unsigned __int128)_request_id;
auto record_data = mutable_variant_object()
("account", account)
("request_id", request_id)
......@@ -592,8 +593,9 @@ void apply_eosio_canceldelay(apply_context& context) {
FC_ASSERT (found, "canceldelay action must be signed with the \"active\" permission for one of the actors"
" provided in the authorizations on the original transaction");
context.cancel_deferred(*reinterpret_cast<const uint128_t*>(trx_id._hash));
const fc::uint128_t _id(trx_id._hash[3], trx_id._hash[2]);
context.cancel_deferred((unsigned __int128)_id);
}
void apply_eosio_mindelay(apply_context& context) {
......
......@@ -1431,6 +1431,7 @@ BOOST_AUTO_TEST_CASE( canceldelay_test ) { try {
BOOST_REQUIRE_EQUAL(transaction_receipt::delayed, trace.status);
BOOST_REQUIRE_EQUAL(1, trace.deferred_transaction_requests.size());
BOOST_REQUIRE_EQUAL(0, trace.action_traces.size());
const auto sender_id_to_cancel = trace.deferred_transaction_requests[0].get<deferred_transaction>().sender_id;
chain.produce_blocks();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册