IRISxiaowang / substrate-bank

MIT No Attribution
0 stars 0 forks source link

Create governance extrinsic to end Lottery early #47

Closed syan095 closed 8 months ago

syan095 commented 9 months ago

Add a governance extrinsic that finalizes a round of lottery immediately.

Lottery should have a "BlockStarted", and the round ends after BlockStarted + LotteryPayoutPeriod length blocks. This means we can no longer use a simple blocknumber % LotteryPayoutPeriod approach. But this means after a round is ended early, the next round is still guaranteed to run for LotteryPayoutPeriod blocks.