Skip to content

Commit

Permalink
discard err returned by script parser and check the next vout
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejo Acosta committed Nov 24, 2022
1 parent 8f850e9 commit 1d8dac0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/transformer/eth_getTransactionByHash.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ func getTransactionByHash(ctx context.Context, p *qtum.Qtum, hash string) (*eth.
ethTx.Value = ethAmount
}

qtumTxContractInfo, isContractTx, err := qtumDecodedRawTx.ExtractContractInfo()
if err != nil {
p.GetDebugLogger().Log("msg", "Couldn't extract contract info", "err", err)
return nil, eth.NewCallbackError(qtumTx.Hex /*"couldn't extract contract info"*/)
}
qtumTxContractInfo, isContractTx, _ := qtumDecodedRawTx.ExtractContractInfo()
// parsing err is discarded because it's not an error if the transaction is not a valid contract call
// https://testnet.qtum.info/tx/24ed3749022ed21e53d8924764bb0303a4b6fa469f26922bfa64ba44507c4c4a
// if err != nil {
// p.GetDebugLogger().Log("msg", "Couldn't extract contract info", "err", err)
// return nil, eth.NewCallbackError(qtumTx.Hex /*"couldn't extract contract info"*/)
// }
if isContractTx {
// TODO: research is this allowed? ethTx.Input = utils.AddHexPrefix(qtumTxContractInfo.UserInput)
if qtumTxContractInfo.UserInput == "" {
Expand Down

0 comments on commit 1d8dac0

Please sign in to comment.