[Version-unspecific] Drop only specific transactions from transaction-specific getThorchainTxIns or GetObservationsStdTx parsing problems
[Version-unspecific]
Intended to close #1836 (closed)
'Unparsable transactions block observation of parsable transactions in the same block'.
Something I'd like to ask particular attention regarding:
While modifying, I noted and changed
https://gitlab.com/thorchain/thornode/-/blob/v1.126.0/bifrost/observer/observe.go#L619-631
to, err := common.NewAddress(item.To)
if err != nil {
o.errCounter.WithLabelValues("fail_to_parse_sender", item.Sender).Inc()
return nil, fmt.Errorf("fail to parse sender,%s is invalid sender address: %w", item.Sender, err)
}
o.logger.Debug().Msgf("pool pubkey %s", item.ObservedVaultPubKey)
chainAddr, _ := item.ObservedVaultPubKey.GetAddress(txIn.Chain)
o.logger.Debug().Msgf("%s address %s", txIn.Chain.String(), chainAddr)
if err != nil {
o.errCounter.WithLabelValues("fail to parse observed pool address", item.ObservedVaultPubKey.String()).Inc()
return nil, fmt.Errorf("fail to parse observed pool address: %s: %w", item.ObservedVaultPubKey.String(), err)
}
to be for "fail_to_parse_to"
and item.To
on the one hand,
and for the "fail to parse observed pool address"to be for the
GetAddresserror instead of being for the earlier
NewAddresserror (dropping the
GetAddress` error).
Feedback is welcome!