Skip to content

Commit bac3dac

Browse files
committed
fix migrate code leaf flag
1 parent bec3579 commit bac3dac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/trie.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const (
3232
WithoutCodeLeafString = "without code leaf"
3333

3434
autoBalanceDataTriesFlag = EnableEpochFlag("AutoBalanceDataTriesFlag")
35-
withoutCodeLeafFlag = EnableEpochFlag("RemoveCodeLeafFlag")
35+
migrateCodeLeafFlag = EnableEpochFlag("MigrateCodeLeafFlag")
3636
)
3737

3838
func (version TrieNodeVersion) String() string {
@@ -69,7 +69,7 @@ func NewTrieNodeVersionVerifier(enableEpochsHandler EnableEpochsHandler) (*trieN
6969

7070
// IsValidVersion returns true if the given trie node version is valid
7171
func (vv *trieNodeVersionVerifier) IsValidVersion(version TrieNodeVersion) bool {
72-
if vv.enableEpochsHandler.IsFlagEnabled(withoutCodeLeafFlag) {
72+
if vv.enableEpochsHandler.IsFlagEnabled(migrateCodeLeafFlag) {
7373
return version <= WithoutCodeLeaf
7474
}
7575
if vv.enableEpochsHandler.IsFlagEnabled(autoBalanceDataTriesFlag) {
@@ -86,7 +86,7 @@ func (vv *trieNodeVersionVerifier) IsInterfaceNil() bool {
8686

8787
// GetVersionForNewData returns the trie node version that should be used for new data
8888
func GetVersionForNewData(handler EnableEpochsHandler) TrieNodeVersion {
89-
if handler.IsFlagEnabled(withoutCodeLeafFlag) {
89+
if handler.IsFlagEnabled(migrateCodeLeafFlag) {
9090
return WithoutCodeLeaf
9191
}
9292
if handler.IsFlagEnabled(autoBalanceDataTriesFlag) {

0 commit comments

Comments
 (0)