MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / commit

Method commit

blockproducer/metastate.go:219–250  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217}
218
219func (s *metaState) commit() {
220 for k, v := range s.dirty.accounts {
221 if v != nil {
222 // New/update object
223 s.readonly.accounts[k] = v
224 } else {
225 // Delete object
226 delete(s.readonly.accounts, k)
227 }
228 }
229 for k, v := range s.dirty.databases {
230 if v != nil {
231 // New/update object
232 s.readonly.databases[k] = v
233 } else {
234 // Delete object
235 delete(s.readonly.databases, k)
236 }
237 }
238 for k, v := range s.dirty.provider {
239 if v != nil {
240 // New/update object
241 s.readonly.provider[k] = v
242 } else {
243 // Delete object
244 delete(s.readonly.provider, k)
245 }
246 }
247 // Clean dirty map
248 s.dirty = newMetaIndex()
249 return
250}
251
252func (s *metaState) clean() {
253 s.dirty = newMetaIndex()

Callers 5

TestChainFunction · 0.45
newBranchFunction · 0.45
applyBlockMethod · 0.45
TestMetaStateFunction · 0.45

Calls 1

newMetaIndexFunction · 0.85

Tested by 2

TestChainFunction · 0.36
TestMetaStateFunction · 0.36