|
|
|
@ -314,10 +314,19 @@ func (hmy *Harmony) GetLogs(ctx context.Context, blockHash common.Hash, isEth bo |
|
|
|
|
return nil, errors.New("Missing receipts") |
|
|
|
|
} |
|
|
|
|
if isEth { |
|
|
|
|
block := hmy.BlockChain.GetBlockByHash(blockHash) |
|
|
|
|
if block != nil { |
|
|
|
|
return nil, errors.New("Missing block data") |
|
|
|
|
} |
|
|
|
|
txns := block.Transactions() |
|
|
|
|
for i, _ := range receipts { |
|
|
|
|
if i < len(txns) { |
|
|
|
|
ethHash := txns[i].ConvertToEth().Hash() |
|
|
|
|
receipts[i].TxHash = ethHash |
|
|
|
|
for j, _ := range receipts[i].Logs { |
|
|
|
|
// Override log txHash with receipt's
|
|
|
|
|
receipts[i].Logs[j].TxHash = receipts[i].TxHash |
|
|
|
|
receipts[i].Logs[j].TxHash = ethHash |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|