Skip to content

Commit 84b4a96

Browse files
lizhefengzjshen14
authored andcommitted
Revert breaking changes (#1202)
1 parent 0a913f2 commit 84b4a96

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

action/protocol/account/util/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func LoadOrCreateAccount(sm protocol.StateManager, encodedAddr string, init *big
4343
}
4444
if errors.Cause(err) == state.ErrStateNotExist {
4545
account.Balance = init
46+
account.VotingWeight = big.NewInt(0)
4647
if err := sm.PutState(addrHash, account); err != nil {
4748
return nil, errors.Wrapf(err, "failed to put state for account %x", addrHash)
4849
}

action/protocol/poll/protocol.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ func setCandidates(
460460
if err != nil {
461461
return errors.Wrapf(err, "failed to load or create the account for delegate %s", candidate.Address)
462462
}
463+
delegate.IsCandidate = true
463464
if err := candidatesutil.LoadAndAddCandidates(sm, height, candidate.Address); err != nil {
464465
return err
465466
}

0 commit comments

Comments
 (0)