Skip to content

Commit

Permalink
should be atomic
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu committed Jul 21, 2023
1 parent b267b22 commit c70053f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vms/platformvm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type VM struct {
manager blockexecutor.Manager

// TODO: Remove after v1.11.x is activated
pruned bool
pruned utils.Atomic[bool]
}

type Config struct {
Expand Down Expand Up @@ -237,7 +237,7 @@ func (vm *VM) Initialize(
)
}

vm.pruned = true
vm.pruned.Set(true)
}()

return nil
Expand Down Expand Up @@ -485,7 +485,7 @@ func (vm *VM) Logger() logging.Logger {
}

func (vm *VM) VerifyHeightIndex(_ context.Context) error {
if vm.pruned {
if vm.pruned.Get() {
return nil
}

Expand Down

0 comments on commit c70053f

Please sign in to comment.