[EOSIO/eos] push_transaction can report error when transaction actually succeeds (#4349)

An defensive approach to solve this issue is manually generate the txid of an transaction before calling `push_transaction`. So that you have the unique identifier of the transaction, you can track the status of that transaction. It avoids the problem that `push_transaction` fails and returns nothing, you won’t event know the txid of the transaction. In which case, it hard to tell if this transaction is failed or succeed even if you got the entire blockchain data.

Generate an transaction’s txid could be hardsome for developers, since the only trace of how the txid is generated is in the EOSIO code base. The alternative is to generate txid while signing the transaction. By looking into the source code a little bit, I think the `signed_transaction` structure got everything we need to generate the txid.

However, signing an transaction and pushing an transaction to blockchain is handled by different plugins, `wallet_plugin` and `chain_plugin` respecitively. I’m not sure if this design will cause any conflict.

Добавить комментарий