MCPcopy Create free account
hub / github.com/cairoeth/preconfirmations / UpdateBlock

Method UpdateBlock

preconf-share/simqueue/queue.go:159–169  ·  view source on GitHub ↗
(block uint64)

Source from the content-addressed store, hash-verified

157}
158
159func (s *RedisQueue) UpdateBlock(block uint64) error {
160 current := atomic.LoadUint64(s.currentBlock)
161 if current == block {
162 return nil
163 }
164 if current > block {
165 return ErrBlockNumberIncorrect
166 }
167 atomic.StoreUint64(s.currentBlock, block)
168 return nil
169}
170
171func (s *RedisQueue) Push(ctx context.Context, data []byte, highPriority bool, minTargetBlock, maxTargetBlock uint64) error {
172 currentBlock := atomic.LoadUint64(s.currentBlock)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected