(block uint64)
| 157 | } |
| 158 | |
| 159 | func (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 | |
| 171 | func (s *RedisQueue) Push(ctx context.Context, data []byte, highPriority bool, minTargetBlock, maxTargetBlock uint64) error { |
| 172 | currentBlock := atomic.LoadUint64(s.currentBlock) |
nothing calls this directly
no outgoing calls
no test coverage detected