clock: remove unused field

This commit is contained in:
Mark Spanbroek 2024-02-28 15:44:17 +01:00
parent 42f8d65c89
commit 733a3bf37d
No known key found for this signature in database
GPG Key ID: FBE3E9548D427C00
1 changed files with 0 additions and 2 deletions

View File

@ -17,7 +17,6 @@ type
offset: times.Duration
started: bool
newBlock: AsyncEvent
lastBlockTime: UInt256
proc new*(_: type OnChainClock, provider: Provider): OnChainClock =
OnChainClock(provider: provider, newBlock: newAsyncEvent())
@ -30,7 +29,6 @@ method start*(clock: OnChainClock) {.async.} =
let blockTime = initTime(blck.timestamp.truncate(int64), 0)
let computerTime = getTime()
clock.offset = blockTime - computerTime
clock.lastBlockTime = blck.timestamp
clock.newBlock.fire()
if latestBlock =? (await clock.provider.getBlock(BlockTag.latest)):