core/state: do not unmarshal Unclaimed balances in account
This commit is contained in:
parent
8cb9e1d85d
commit
e503d1001d
6 changed files with 174 additions and 21 deletions
|
@ -379,7 +379,13 @@ func (s *Server) getClaimable(ps request.Params) (interface{}, error) {
|
|||
|
||||
var unclaimed []state.UnclaimedBalance
|
||||
if acc := s.chain.GetAccountState(u); acc != nil {
|
||||
unclaimed = acc.Unclaimed
|
||||
err := acc.Unclaimed.ForEach(func(b *state.UnclaimedBalance) error {
|
||||
unclaimed = append(unclaimed, *b)
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
var sum util.Fixed8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue