Skip to content

Commit c78296a

Browse files
committed
fix: session max bytes in subscription module
1 parent f6e1cf9 commit c78296a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x/subscription/keeper/session.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ func (k *Keeper) UpdateSessionMaxValues(ctx sdk.Context, session sessiontypes.Se
3434
}
3535

3636
// Calculate the maximum allowable session bytes and duration
37-
maxBytes := alloc.GrantedBytes.Sub(alloc.UtilisedBytes)
37+
diffBytes := alloc.GrantedBytes.Sub(alloc.UtilisedBytes)
38+
maxBytes := s.Bytes().Add(diffBytes)
3839
maxDuration := subscription.InactiveAt.Sub(s.StartAt)
3940

4041
// Update the session with calculated max bytes and duration

0 commit comments

Comments
 (0)