Simple Staking Payouts (#5406)

* Simple Payouts

* explicit test for out of order claiming

* Add `payout_all` benchmark

* Fix merge

* add docs

* change event to controller

* Fix timestamp test warnings

* Revert "change event to controller"

This reverts commit 5d4a97832d47fe1273602d5410774d5421940c4e.

* Update Reward event doc

* Add "non-production" test

* add unlock chunk to test

* fix merge

* End payout early if no reward points

* payout_validator -> payout_stakers

* bring back payout nominator/validator, but limit their use to before migration era

* Add test for before migration

* New payout works for the era that we migrate

* Fix logic, check that migration era works

* Migrate Era tests (copypasta)

* Move comment

* Add mock back to external functions

* Fixes based on review from gui

* Update Cargo.lock

* Update Cargo.lock

* small docs update

Co-authored-by: joepetrowski <joe@parity.io>
This commit is contained in:
Shawn Tabrizi
2020-04-04 14:50:08 +02:00
committed by GitHub
parent 7c0fa83720
commit 6847f8452e
6 changed files with 1034 additions and 254 deletions
+1
View File
@@ -34,6 +34,7 @@ rand_chacha = { version = "0.2", default-features = false, optional = true }
[dev-dependencies]
sp-core = { version = "2.0.0-alpha.5", path = "../../primitives/core" }
sp-storage = { version = "2.0.0-alpha.5", path = "../../primitives/storage" }
pallet-balances = { version = "2.0.0-alpha.5", path = "../balances" }
pallet-timestamp = { version = "2.0.0-alpha.5", path = "../timestamp" }
pallet-staking-reward-curve = { version = "2.0.0-alpha.5", path = "../staking/reward-curve" }