fix: add TODO about lane merging

This commit is contained in:
Dirk McCormick 2020-07-10 15:24:13 -04:00
parent f07c7377b6
commit a12e5884ab

View File

@ -121,6 +121,11 @@ func (pm *Manager) laneState(state *paych.State, ch address.Address) (map[uint64
// Get the total redeemed amount across all lanes, after applying the voucher // Get the total redeemed amount across all lanes, after applying the voucher
func (pm *Manager) totalRedeemedWithVoucher(laneStates map[uint64]*paych.LaneState, sv *paych.SignedVoucher) (big.Int, error) { func (pm *Manager) totalRedeemedWithVoucher(laneStates map[uint64]*paych.LaneState, sv *paych.SignedVoucher) (big.Int, error) {
// TODO: merges
if len(sv.Merges) != 0 {
return big.Int{}, xerrors.Errorf("dont currently support paych lane merges")
}
total := big.NewInt(0) total := big.NewInt(0)
for _, ls := range laneStates { for _, ls := range laneStates {
total = big.Add(total, ls.Redeemed) total = big.Add(total, ls.Redeemed)