New answers tagged

0

The result you get after sending transaction doesn't guarantee this transaction to be included in the block. When node receives a transaction, it tries executing transaction with current state. If it is executed normally, node will return locally executed result immediately to sender and broadcast transaction to other BPs. However, because of various reasons ...


0

Don't know where the 49 comes from but you are doing a reinterpret_cast from std::array<uint8_t,32> which is 256 bit to uint64_t which is 64 bit - this doesn't not seem like a good idea in principle. Are these values real, tested examples? sha256(d83631286d922f747aaee529d86cb566) converts to 49 sha256(7dc0cc92aa96cf8e8909cbe5468c1b4d) converts to ...


1

The question asks how to create a literal. Managing to assign a number to a variable is not quite the same. If you have a true literal, an optimizing compiler will be able to fold that into the code. But if you have a variable, the compiler will be forced to load from memory on every access, because a variable might change. You can create a true literal ...


0

The correct library is now #include <eosio/crypto.hpp>


0

There is an improvement that makes action can have return value, but not applied to mainnet yet. After its applying, you can check that value from action_receipt. Current feasible solution is making a table storing the result of last executed action and reading it. auto it = some_table_index.emplace(payer, [&](auto& row) { row.id = ...


Top 50 recent answers are included