Update bsip-0040.md
This commit is contained in:
parent
189ceec7b1
commit
cb79a4fc13
1 changed files with 3 additions and 3 deletions
|
@ -93,11 +93,11 @@ Stateless assert, only `string` type arguments. Length of string (or encrypted s
|
||||||
|
|
||||||
#### `limit`
|
#### `limit`
|
||||||
Statefull assert, only `int` type arguments. When the authority is created, `interval_began` is set to `valid_from` from its custom active authority and `max_cumsum` to `0`. Incoming operations are first tried to match all stateless asserts,
|
Statefull assert, only `int` type arguments. When the authority is created, `interval_began` is set to `valid_from` from its custom active authority and `max_cumsum` to `0`. Incoming operations are first tried to match all stateless asserts,
|
||||||
and if all passes continue with statefull asserts. If `now > interval_began + interval_in_sec`, then set `max_cumsum = 0`.
|
and if all passes continue with statefull asserts. If `now > interval_began + interval_in_sec`, then set `max_cumsum = 0` and set `interval_began = now`.
|
||||||
The assert that needs to pass is now `current_cumsum + incoming value <= max_cumsum`. If all asserts are passed, update `current_cumsum` of all involved statefull asserts.
|
The assert that needs to pass is now `current_cumsum + incoming value <= max_cumsum`. If all asserts are passed, update `current_cumsum = current_cumsum + incoming value` of all involved statefull asserts.
|
||||||
|
|
||||||
#### `limit_monthly`
|
#### `limit_monthly`
|
||||||
Statefull assert, only `int` type arguments. Analogue to `limit`, but the time assert is `month(now) >= interval_began + interval_in_months` (include logic for month overflow when year changes).
|
Statefull assert, only `int` type arguments. Analogue to `limit`, but `interval_began` is initially set to `month(valid_from)` and set to `month(now)` on update, additionally the time assert is `month(now) >= interval_began + interval_in_months` (include logic for month overflow when year changes).
|
||||||
|
|
||||||
### Simple Example
|
### Simple Example
|
||||||
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
|
Assume account A and B and some unrelated key K. Furthermore A has a custom active authority in the following way:
|
||||||
|
|
Loading…
Reference in a new issue