diskLayer is a low level persistent snapshot built on top of a key-value store.
| 31 | |
| 32 | // diskLayer is a low level persistent snapshot built on top of a key-value store. |
| 33 | type diskLayer struct { |
| 34 | diskdb ethdb.KeyValueStore // Key-value store containing the base snapshot |
| 35 | triedb *trie.Database // Trie node cache for reconstruction purposes |
| 36 | cache *fastcache.Cache // Cache to avoid hitting the disk for direct access |
| 37 | |
| 38 | root common.Hash // Root hash of the base snapshot |
| 39 | stale bool // Signals that the layer became stale (state progressed) |
| 40 | |
| 41 | genMarker []byte // Marker for the state that's indexed during initial layer generation |
| 42 | genPending chan struct{} // Notification channel when generation is done (test synchronicity) |
| 43 | genAbort chan chan *generatorStats // Notification channel to abort generating the snapshot in this layer |
| 44 | |
| 45 | lock sync.RWMutex |
| 46 | } |
| 47 | |
| 48 | // Root returns root hash for which this snapshot was made. |
| 49 | func (dl *diskLayer) Root() common.Hash { |
nothing calls this directly
no outgoing calls
no test coverage detected