Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion network/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func (n *p2pNetwork) choosePeersToTrim(trimCnt int, trimInboundOnly bool) map[pe

// bootstrapDiscovery starts the required services
// it will try to bootstrap discovery service, and inject a connect function.
// the connect function checks if we can connect to the given peer and if so passing it to the backoff connector.
// the connect function checks if we can connect to the given peer and if so, passes it to the backoff connector.
func (n *p2pNetwork) bootstrapDiscovery(connector chan peer.AddrInfo) {
defer close(connector)
err := tasks.Retry(func() error {
Expand Down
2 changes: 1 addition & 1 deletion protocol/v2/ssv/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ func (b *BaseRunner) basePostConsensusMsgProcessing(
return hasQuorum, slices.Collect(maps.Keys(quorumRoots)), nil
}

// basePartialSigMsgProcessing adds a validated (without signature verification) validated partial msg to the container, checks for quorum and returns true (and roots) if quorum exists
// basePartialSigMsgProcessing adds a validated (without signature verification) partial msg to the container, checks for quorum and returns true (and roots) if quorum exists
func (b *BaseRunner) basePartialSigMsgProcessing(
signedMsg *spectypes.PartialSignatureMessages,
container *ssv.PartialSigContainer,
Expand Down
8 changes: 4 additions & 4 deletions storage/badger/badger.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func (b *DB) SetMany(prefix []byte, n int, next func(int) (basedb.Obj, error)) e
return wb.Flush()
}

// Get return value for specified key
// Get returns value for specified key
func (b *DB) Get(prefix []byte, key []byte) (basedb.Obj, bool, error) {
txn := b.db.NewTransaction(false)
defer txn.Discard()
return newTxn(txn, b).Get(prefix, key)
}

// GetMany return values for the given keys
// GetMany returns values for the given keys
func (b *DB) GetMany(prefix []byte, keys [][]byte, iterator func(basedb.Obj) error) error {
if len(keys) == 0 {
return nil
Expand All @@ -146,7 +146,7 @@ func (b *DB) GetMany(prefix []byte, keys [][]byte, iterator func(basedb.Obj) err
return err
}

// Delete key in specific prefix
// Delete deletes key in specific prefix
func (b *DB) Delete(prefix []byte, key []byte) error {
return b.db.Update(func(txn *badger.Txn) error {
return newTxn(txn, b).Delete(prefix, key)
Expand All @@ -162,7 +162,7 @@ func (b *DB) GetAll(prefix []byte, handler func(int, basedb.Obj) error) error {
return err
}

// CountPrefix return the object count for all keys under specified prefix(bucket)
// CountPrefix returns the object count for all keys under specified prefix(bucket)
func (b *DB) CountPrefix(prefix []byte) (int64, error) {
var res int64
err := b.db.View(func(txn *badger.Txn) error {
Expand Down