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

Function onlyValidatorIsUs

node/node.go:360–366  ·  view source on GitHub ↗
(state sm.State, pubKey crypto.PubKey)

Source from the content-addressed store, hash-verified

358}
359
360func onlyValidatorIsUs(state sm.State, pubKey crypto.PubKey) bool {
361 if state.Validators.Size() > 1 {
362 return false
363 }
364 addr, _ := state.Validators.GetByIndex(0)
365 return bytes.Equal(pubKey.Address(), addr)
366}
367
368func createMempoolAndMempoolReactor(
369 config *cfg.Config,

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