Skip to content

Commit

Permalink
Add revert for UpdateValidatorWrapper: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMustermann2 committed Nov 20, 2021
1 parent 257d473 commit 3d3a5de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import (
"github.com/harmony-one/harmony/staking"
"github.com/harmony-one/harmony/staking/effective"
stk "github.com/harmony-one/harmony/staking/types"
staketest "github.com/harmony-one/harmony/staking/types/test"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -630,10 +629,6 @@ func (db *DB) Copy() *DB {
}
state.stateObjectsDirty[addr] = struct{}{}
}
for addr := range db.stateValidators {
validatorWrapper := staketest.CopyValidatorWrapper(*db.stateValidators[addr])
state.stateValidators[addr] = &validatorWrapper
}
for hash, logs := range db.logs {
cpy := make([]*types.Log, len(logs))
for i, l := range logs {
Expand Down
2 changes: 1 addition & 1 deletion staking/availability/measure.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func ComputeAndMutateEPOSStatus(
Interface("computed", computed).
Str("validator", snapshot.Validator.Address.String()).
Msg("validator failed availability threshold, set to inactive")
state.UpdateValidatorWrapper(wrapper)
state.UpdateValidatorWrapper(addr, wrapper)
default:
// Default is no-op so validator who wants
// to leave the committee can actually leave.
Expand Down

0 comments on commit 3d3a5de

Please sign in to comment.