MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / onlyValidatorIsUs

Function onlyValidatorIsUs

test/maverick/node/node.go:374–380  ·  view source on GitHub ↗
(state sm.State, pubKey crypto.PubKey)

Source from the content-addressed store, hash-verified

372}
373
374func onlyValidatorIsUs(state sm.State, pubKey crypto.PubKey) bool {
375 if state.Validators.Size() > 1 {
376 return false
377 }
378 addr, _ := state.Validators.GetByIndex(0)
379 return bytes.Equal(pubKey.Address(), addr)
380}
381
382func createMempoolAndMempoolReactor(config *cfg.Config, proxyApp proxy.AppConns,
383 state sm.State, memplMetrics *mempl.Metrics, logger log.Logger,

Callers 1

NewNodeFunction · 0.70

Calls 4

SizeMethod · 0.65
GetByIndexMethod · 0.65
EqualMethod · 0.65
AddressMethod · 0.65

Tested by

no test coverage detected