Skip to content

Commit

Permalink
post block headers only for supported EVM chains
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Dec 21, 2023
1 parent 27303ee commit 81fd4c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zetaclient/evm_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,11 @@ func (ob *EVMChainClient) observeInTX() error {

// query incoming gas asset
for bn := startBlock; bn <= toBlock; bn++ {
err = ob.postBlockHeader(toBlock)
if err != nil {
ob.logger.ExternalChainWatcher.Error().Err(err).Msg("error posting block header")
if common.IsHeaderSupportedEvmChain(ob.chain.ChainId) { // post block header for supported chains
err = ob.postBlockHeader(toBlock)
if err != nil {
ob.logger.ExternalChainWatcher.Error().Err(err).Msg("error posting block header")
}
}
block, err := ob.GetBlockByNumberCached(bn)
if err != nil {
Expand Down

0 comments on commit 81fd4c5

Please sign in to comment.