Adds target approvals buffering below a threshold (#5168)
This PR adds target stake updates buffering to `stake-tracker`. It exposes a configuration that defines a threshold below which the target score *should not* be updated automatically in the target list. The `Config::ScoreStrictUpdateThreshold` defines said threshold. If a target stake update is below the threshold, the stake update is buffered in the `UnsettledTargetScore` storage map while the target list is not affected. Multiple approvals updates can be buffered for the same target. Calling `Call::settle` will setttle the buffered approvals tally for a given target. Setting `Config::ScoreStrictUpdateThreshold` to `None` disables the stake approvals buffering. - [x] benchmarks - [x] `try-state` checks considering the unsettled score - [x] docs --------- Co-authored-by: command-bot <>
parent
06b68215
Please register or sign in to comment