xaya / taurion_gsp

Taurion - A Fully Decentralised MMO built for the Xaya Platform.
https://taurion.io
GNU General Public License v3.0
23 stars 10 forks source link

Stop prospecting prizes at given end time #25

Closed domob1812 closed 5 years ago

domob1812 commented 5 years ago

We should stop giving out prizes for prospecting when the competition ends. I.e. turn off prizes when the first block nTime is seen that is beyond the timestamp 1571148000.

domob1812 commented 5 years ago

We can just add an "active" field to the prizes database table and set that to false whenever a block has nTime larger than the end time. And when giving out prizes, only consider ones which are active.

domob1812 commented 5 years ago

Discussed with @xaya, we'll do it slightly differently: Prizes can be won in blocks whose own timestamp (nTime) is not after the end time. This is simpler to implement, as it does not need any context (i.e. if a block after the time did already appear in the past).