Closed bun919tw closed 6 years ago
Note that I also found that the calculation of the priority could be changed to
uint256 priority = max(childChain[blknum].created_at, now - 1 weeks);
Setting the priority equals to the timestamp still follow the requirement that any exit needs to wait at least 7 days. By doing so, we could remove the modifier incrementOldBlocks
.
David's solution is much better! Close this.
Modify
exitIds
structure frommapping(uint256 => uint256)
tomapping(uint256 => uint256[])
. EachexitIds[priority]
will have a list of exit IDs. When finalizing exits, we clear all exits with same priority at once.