Why clear deliverState and clear cache of IAVL tree after committing the block?


#1

We clear deliverState and checkState every time after we committing the block, and at the same time, we clear the branches of the IAVL+ tree.

I wonder that why we clear the cache every time because that will cost more time to load the states from database in the next block.

Can anyone explain the reason why we clear the cache?