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

Method Update

libs/bits/bit_array.go:359–369  ·  view source on GitHub ↗

Update sets the bA's bits to be that of the other bit array. The copying begins from the begin of both bit arrays.

(o *BitArray)

Source from the content-addressed store, hash-verified

357// Update sets the bA's bits to be that of the other bit array.
358// The copying begins from the begin of both bit arrays.
359func (bA *BitArray) Update(o *BitArray) {
360 if bA == nil || o == nil {
361 return
362 }
363
364 bA.mtx.Lock()
365 o.mtx.Lock()
366 copy(bA.Elems, o.Elems)
367 o.mtx.Unlock()
368 bA.mtx.Unlock()
369}
370
371// MarshalJSON implements json.Marshaler interface by marshaling bit array
372// using a custom format: a string of '-' or 'x' where 'x' denotes the 1 bit.

Callers

nothing calls this directly

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected