Skip to content

Commit

Permalink
skip unsupported chain parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Jan 13, 2024
1 parent c657669 commit 737736b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

### Fixes

* [1575](https://github.com/zeta-chain/node/issues/1575) - Skip unsupported chain parameters by IsSupported flag
* [1554](https://github.com/zeta-chain/node/pull/1554) - Screen out unconfirmed UTXOs that are not created by TSS itself
* [1560](https://github.com/zeta-chain/node/issues/1560) - Zetaclient post evm-chain outtx hashes only when receipt is available
* [1516](https://github.com/zeta-chain/node/issues/1516) - Unprivileged outtx tracker removal
Expand Down
15 changes: 9 additions & 6 deletions zetaclient/zetacore_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ func (b *ZetaCoreBridge) UpdateConfigFromCore(cfg *config.Config, init bool) err
return err
}
if plan != nil && bn == plan.Height-1 { // stop zetaclients; notify operator to upgrade and restart
b.logger.Warn().Msgf("Active upgrade plan detected and upgrade height reached: %s at height %d; ZetaClient is stopped; please kill this process, replace zetaclientd binary with upgraded version, and restart zetaclientd", plan.Name, plan.Height)
b.logger.Warn().Msgf("Active upgrade plan detected and upgrade height reached: %s at height %d; ZetaClient is stopped;"+
"please kill this process, replace zetaclientd binary with upgraded version, and restart zetaclientd", plan.Name, plan.Height)
b.pause <- struct{}{} // notify CoreObserver to stop ChainClients, Signers, and CoreObservder itself
}

Expand All @@ -212,14 +213,16 @@ func (b *ZetaCoreBridge) UpdateConfigFromCore(cfg *config.Config, init bool) err
for _, chainParam := range chainParams {
err := config.ValidateChainParams(chainParam)
if err != nil {
b.logger.Debug().Err(err).Msgf(
"Invalid core params for chain %s",
common.GetChainFromChainID(chainParam.ChainId).ChainName,
)
b.logger.Warn().Err(err).Msgf("Invalid chain params for chain %d", chainParam.ChainId)
continue
}
if !chainParam.GetIsSupported() {
b.logger.Info().Msgf("Chain %d is not supported yet", chainParam.ChainId)
continue
}
if common.IsBitcoinChain(chainParam.ChainId) {
newBTCParams = chainParam
} else {
} else if common.IsEVMChain(chainParam.ChainId) {
newEVMParams[chainParam.ChainId] = chainParam
}
}
Expand Down

0 comments on commit 737736b

Please sign in to comment.