mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-06 07:13:07 +00:00
Add mutation 001: accumulateFlows off-by-one
This commit is contained in:
parent
c6b4e5e5b5
commit
a63fcd9b56
13
certora/mutations/001_accumulateFlows_off_by_one.patch
Normal file
13
certora/mutations/001_accumulateFlows_off_by_one.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/contracts/vault/Accounts.sol b/contracts/vault/Accounts.sol
|
||||
index 3066e7d..c93554d 100644
|
||||
--- a/contracts/vault/Accounts.sol
|
||||
+++ b/contracts/vault/Accounts.sol
|
||||
@@ -81,7 +81,7 @@ library Accounts {
|
||||
Timestamp timestamp
|
||||
) internal pure {
|
||||
Duration duration = account.flow.updated.until(timestamp);
|
||||
- account.balance.available -= account.flow.outgoing.accumulate(duration);
|
||||
+ account.balance.available -= account.flow.outgoing.accumulate(duration) + 1;
|
||||
account.balance.designated += account.flow.incoming.accumulate(duration);
|
||||
account.flow.updated = timestamp;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user