Merge pull request #2089 from kcalvinalvin/2024-01-03-add-last-flush-time-on-initconsistentstate

blockchain: set the lastflushtime when setting the lastflushhash
This commit is contained in:
Olaoluwa Osuntokun 2024-01-23 20:25:55 -08:00 committed by GitHub
commit 13152b35e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -634,6 +634,10 @@ func (b *BlockChain) InitConsistentState(tip *blockNode, interrupt <-chan struct
// it to the tip since we checked it's consistent.
s.lastFlushHash = tip.hash
// Set the last flush time as now since we know the state is consistent
// at this time.
s.lastFlushTime = time.Now()
return nil
}