@@ -58,18 +58,6 @@ func layersGetKeyOrVoid*(db: AristoTxRef; rvid: RootedVertexID): HashKey =
5858 # # Simplified version of `layersGetKey()`
5959 (db.layersGetKey (rvid).valueOr (VOID_HASH_KEY , 0 ))[0 ]
6060
61- func layersGetAccLeaf * (db: AristoTxRef ; accPath: Hash32 ): Opt [AccLeafRef ] =
62- for w in db.rstack (stopAtSnapshot = true ):
63- if w.snapshot.level.isSome ():
64- w.snapshot.acc.withValue (accPath, item):
65- return Opt .some (item[][0 ])
66- break
67-
68- w.accLeaves.withValue (accPath, item):
69- return Opt .some (item[])
70-
71- Opt .none (AccLeafRef )
72-
7361func layersGetStoLeaf * (db: AristoTxRef ; mixPath: Hash32 ): Opt [StoLeafRef ] =
7462 for w in db.rstack (stopAtSnapshot = true ):
7563 if w.snapshot.level.isSome ():
@@ -129,12 +117,6 @@ func layersResKeys*(db: AristoTxRef; hike: Hike, skip: int) =
129117 for i in (skip + 1 ).. hike.legs.len:
130118 db.layersResKey ((hike.root, hike.legs[^ i].wp.vid), hike.legs[^ i].wp.vtx)
131119
132- func layersPutAccLeaf * (db: AristoTxRef ; accPath: Hash32 ; leafVtx: AccLeafRef ) =
133- db.accLeaves[accPath] = leafVtx
134-
135- if db.snapshot.level.isSome ():
136- db.snapshot.acc[accPath] = (leafVtx, db.level)
137-
138120func layersPutStoLeaf * (db: AristoTxRef ; mixPath: Hash32 ; leafVtx: StoLeafRef ) =
139121 db.stoLeaves[mixPath] = leafVtx
140122
@@ -149,11 +131,9 @@ func isEmpty*(ly: AristoTxRef): bool =
149131 # # Returns `true` if the layer does not contain any changes, i.e. all the
150132 # # tables are empty.
151133 ly.snapshot.vtx.len == 0 and
152- ly.snapshot.acc.len == 0 and
153134 ly.snapshot.sto.len == 0 and
154135 ly.sTab.len == 0 and
155136 ly.kMap.len == 0 and
156- ly.accLeaves.len == 0 and
157137 ly.stoLeaves.len == 0
158138
159139proc copyFrom * (snapshot: var Snapshot , tx: AristoTxRef ) =
@@ -163,8 +143,6 @@ proc copyFrom*(snapshot: var Snapshot, tx: AristoTxRef) =
163143 do :
164144 snapshot.vtx[rvid] = (vtx, VOID_HASH_KEY , tx.level)
165145
166- for k, v in tx.accLeaves:
167- snapshot.acc[k] = (v, tx.level)
168146 for k, v in tx.stoLeaves:
169147 snapshot.sto[k] = (v, tx.level)
170148
@@ -195,7 +173,6 @@ proc mergeAndReset*(trg, src: AristoTxRef) =
195173 mergeAndReset (trg.sTab, src.sTab)
196174 mergeAndReset (trg.kMap, src.kMap)
197175
198- mergeAndReset (trg.accLeaves, src.accLeaves)
199176 mergeAndReset (trg.stoLeaves, src.stoLeaves)
200177
201178# ------------------------------------------------------------------------------
0 commit comments