refactor: use _adjustRatePerSecond function in _pause and _restart
refactor: remove zero check in _adjustRatePerSecond
refactor: remove no longer needed custom error
perf: remove unneeded variables declared in certain functions
test: update tests accordingly
test: add a new invariant for stream status
docs: undo diagrams change
Note: i know that _restart function was not updating the sd before, but now using _adjustRatePerSecond it practically does it but in theory it won't as it _ongoingDebt will return 0 and no changes will be made to it, thus no gas implications.
I consider better to focus the "snapshot" updates centralized into one place, wdyt?
Changes
Note: i know that
_restart
function was not updating thesd
before, but now using_adjustRatePerSecond
it practically does it but in theory it won't as it_ongoingDebt
will return 0 and no changes will be made to it, thus no gas implications. I consider better to focus the "snapshot" updates centralized into one place, wdyt?