Do not store pythnet observations (#49)

This commit is contained in:
Gabriel Zimmermann 2022-12-26 19:30:58 -03:00 committed by GitHub
parent 9f035b40bd
commit 43c529e5d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -95,6 +95,11 @@ func (s *Repository) UpsertObservation(o *gossipv1.SignedObservation) error {
now := time.Now()
//TODO error handling
chainId, err := strconv.ParseUint(chainIdStr, 10, 16)
// TODO should we notify the caller that pyth observations are not stored?
if vaa.ChainID(chainId) == vaa.ChainIDPythNet {
return nil
}
sequence, err := strconv.ParseUint(sequenceStr, 10, 64)
addr := eth_common.BytesToAddress(o.GetAddr())
obs := ObservationUpdate{