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

Method StringIndented

types/validator_set.go:725–744  ·  view source on GitHub ↗

StringIndented returns an intended String. See Validator#String.

(indent string)

Source from the content-addressed store, hash-verified

723//
724// See Validator#String.
725func (vals *ValidatorSet) StringIndented(indent string) string {
726 if vals == nil {
727 return "nil-ValidatorSet"
728 }
729 var valStrings []string
730 vals.Iterate(func(index int, val *Validator) bool {
731 valStrings = append(valStrings, val.String())
732 return false
733 })
734 return fmt.Sprintf(`ValidatorSet{
735%s Proposer: %v
736%s Validators:
737%s %v
738%s}`,
739 indent, vals.GetProposer().String(),
740 indent,
741 indent, strings.Join(valStrings, "\n"+indent+" "),
742 indent)
743
744}
745
746//-------------------------------------
747

Callers 1

StringMethod · 0.95

Calls 3

IterateMethod · 0.95
GetProposerMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected