disable all config compare because it cant rollback to previous version

This commit is contained in:
liam.lai 2025-11-23 15:43:56 +08:00 committed by benjamin202410
parent 50602a0298
commit 732ee2775d

View file

@ -18,9 +18,7 @@ package params
import ( import (
"fmt" "fmt"
"maps"
"math/big" "math/big"
"slices"
"strings" "strings"
"sync" "sync"
@ -527,29 +525,24 @@ func V2Equal(a, b *V2) bool {
return false return false
} }
if !slices.Equal(a.configIndex, b.configIndex) { // if !maps.EqualFunc(a.AllConfigs, b.AllConfigs, V2ConfigEqual) {
log.Info("[V2Equal] configIndex mismatch", "a.configIndex", a.configIndex, "b.configIndex", b.configIndex) // log.Info("[V2Equal] AllConfigs mismatch", "a.AllConfigs.len", len(a.AllConfigs), "b.AllConfigs.len", len(b.AllConfigs))
return false // // Log details about which configs differ
} // for key, aConfig := range a.AllConfigs {
// bConfig, exists := b.AllConfigs[key]
if !maps.EqualFunc(a.AllConfigs, b.AllConfigs, V2ConfigEqual) { // if !exists {
log.Info("[V2Equal] AllConfigs mismatch", "a.AllConfigs.len", len(a.AllConfigs), "b.AllConfigs.len", len(b.AllConfigs)) // log.Info("[V2Equal] AllConfigs key missing in b", "key", key)
// Log details about which configs differ // } else if !V2ConfigEqual(aConfig, bConfig) {
for key, aConfig := range a.AllConfigs { // log.Info("[V2Equal] AllConfigs value mismatch at key", "key", key)
bConfig, exists := b.AllConfigs[key] // }
if !exists { // }
log.Info("[V2Equal] AllConfigs key missing in b", "key", key) // for key := range b.AllConfigs {
} else if !V2ConfigEqual(aConfig, bConfig) { // if _, exists := a.AllConfigs[key]; !exists {
log.Info("[V2Equal] AllConfigs value mismatch at key", "key", key) // log.Info("[V2Equal] AllConfigs key missing in a", "key", key)
} // }
} // }
for key := range b.AllConfigs { // return false
if _, exists := a.AllConfigs[key]; !exists { // }
log.Info("[V2Equal] AllConfigs key missing in a", "key", key)
}
}
return false
}
return true return true
} }