Allow an Offset to Lease Periods (#3980)

* add slot offset for slots

* trying things out

* fix test

* improve api to return the first block of a new lease period

* add an integration test with offset

* de-duplicate test

* hide lease period_period_length from public api

* fix benchmarks

* Update runtime/common/src/slots.rs

* support the exact same range of crowdloans

* fix docs

* fix docs again

* introduce offset to runtimes

* fix and check edge case w/ offset and lease period first block

* remove newline

* turn into an option

* fix benchmarks

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Shawn TabriziandRobert Habermeier authored and GitHub committed 2021-10-05 09:07:47 -05:00
1 parent fcadf0ecc5
commit d6d37621b0
9 files changed
+386 -239

No files matched your search

+1
View File
@@ -1003,6 +1003,7 @@ impl slots::Config for Runtime {
type Currency = Balances;
type Registrar = Registrar;
type LeasePeriod = LeasePeriod;
type LeaseOffset = ();
type WeightInfo = slots::TestWeightInfo;
}