forked from TrueCloudLab/neoneo-go
core: properly save votes when processing Account descriptor
They were ignored basically.
This commit is contained in:
parent
807309a0de
commit
8310b76d28
1 changed files with 2 additions and 1 deletions
|
@ -713,8 +713,8 @@ func processAccountStateDescriptor(descriptor *transaction.StateDescriptor, dao
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
account.Votes = votes
|
||||||
if votes.Len() != len(account.Votes) {
|
if votes.Len() != len(account.Votes) {
|
||||||
account.Votes = votes
|
|
||||||
for _, vote := range votes {
|
for _, vote := range votes {
|
||||||
validator, err := dao.GetValidatorStateOrNew(vote)
|
validator, err := dao.GetValidatorStateOrNew(vote)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -725,6 +725,7 @@ func processAccountStateDescriptor(descriptor *transaction.StateDescriptor, dao
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return dao.PutAccountState(account)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue