fix: assert type error

pull/3649/head
xiaohuo 4 years ago committed by Leo Chen
parent 70e7efea49
commit 3140f75d16
  1. 3
      hmy/staking.go

@ -557,8 +557,7 @@ func (hmy *Harmony) GetUndelegationPayouts(
payouts, ok := hmy.undelegationPayoutsCache.Get(epoch.Uint64()) payouts, ok := hmy.undelegationPayoutsCache.Get(epoch.Uint64())
if ok { if ok {
result := payouts.(UndelegationPayouts) return payouts.(*UndelegationPayouts), nil
return &result, nil
} }
undelegationPayouts := NewUndelegationPayouts() undelegationPayouts := NewUndelegationPayouts()
// require second to last block as saved undelegations are AFTER undelegations are payed out // require second to last block as saved undelegations are AFTER undelegations are payed out

Loading…
Cancel
Save