MCPcopy Create free account
hub / github.com/tendermint/tendermint / GetIndex

Method GetIndex

libs/bits/bit_array.go:49–56  ·  view source on GitHub ↗

GetIndex returns the bit at index i within the bit array. The behavior is undefined if i >= bA.Bits

(i int)

Source from the content-addressed store, hash-verified

47// GetIndex returns the bit at index i within the bit array.
48// The behavior is undefined if i >= bA.Bits
49func (bA *BitArray) GetIndex(i int) bool {
50 if bA == nil {
51 return false
52 }
53 bA.mtx.Lock()
54 defer bA.mtx.Unlock()
55 return bA.getIndex(i)
56}
57
58func (bA *BitArray) getIndex(i int) bool {
59 if i >= bA.Bits {

Callers 2

TestAndFunction · 0.45
TestOrFunction · 0.45

Calls 3

getIndexMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 2

TestAndFunction · 0.36
TestOrFunction · 0.36