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

Method verifySequence

worker/db_storage.go:141–155  ·  view source on GitHub ↗
(connID uint64, seqNo uint64)

Source from the content-addressed store, hash-verified

139}
140
141func (db *Database) verifySequence(connID uint64, seqNo uint64) (err error) {
142 var data interface{}
143 var ok bool
144 var lastSeq uint64
145
146 if data, ok = db.connSeqs.Load(connID); ok {
147 lastSeq, _ = data.(uint64)
148
149 if seqNo <= lastSeq {
150 return ErrInvalidRequestSeq
151 }
152 }
153
154 return
155}
156
157func (db *Database) evictSequences() {
158 m := make(map[uint64]*list.Element)

Callers 1

CheckMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected