mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-02 13:23:10 +00:00
Ensure to get the next block timestamp
This commit is contained in:
parent
abdbb48a3c
commit
98e73ed0a0
@ -12,7 +12,11 @@ async function snapshot() {
|
||||
async function revert() {
|
||||
const { id, time, automine } = snapshots.pop()
|
||||
await ethers.provider.send("evm_revert", [id])
|
||||
await ethers.provider.send("evm_setNextBlockTimestamp", [time])
|
||||
|
||||
const current = await currentTime()
|
||||
const nextTime = Math.max(time + 1, current + 1)
|
||||
|
||||
await ethers.provider.send("evm_setNextBlockTimestamp", [nextTime])
|
||||
await ethers.provider.send("evm_setAutomine", [automine])
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user