rpc: tx receipt don't contain events (#580)

* tx receipt don't contains events

- Should convert tx hash when query transaction logs

* tx index should start from 0
This commit is contained in:
yihuang
2021-09-22 06:01:35 -03:00
committed by GitHub
parent d84837a438
commit 01b789c3e9
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -168,7 +168,6 @@ func (k *Keeper) ApplyTransaction(tx *ethtypes.Transaction) (*types.MsgEthereumT
// set the transaction hash and index to the impermanent (transient) block state so that it's also
// available on the StateDB functions (eg: AddLog)
k.SetTxHashTransient(txHash)
k.IncreaseTxIndexTransient()
if !k.ctxStack.IsEmpty() {
panic("context stack shouldn't be dirty before apply message")
@@ -186,6 +185,8 @@ func (k *Keeper) ApplyTransaction(tx *ethtypes.Transaction) (*types.MsgEthereumT
return nil, stacktrace.Propagate(err, "failed to apply ethereum core message")
}
k.IncreaseTxIndexTransient()
res.Hash = txHash.Hex()
logs := k.GetTxLogsTransient(txHash)