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

Method updatePrivValidatorPubKey

consensus/state.go:2258–2269  ·  view source on GitHub ↗

updatePrivValidatorPubKey get's the private validator public key and memoizes it. This func returns an error if the private validator is not responding or responds with an error.

()

Source from the content-addressed store, hash-verified

2256// memoizes it. This func returns an error if the private validator is not
2257// responding or responds with an error.
2258func (cs *State) updatePrivValidatorPubKey() error {
2259 if cs.privValidator == nil {
2260 return nil
2261 }
2262
2263 pubKey, err := cs.privValidator.GetPubKey()
2264 if err != nil {
2265 return err
2266 }
2267 cs.privValidatorPubKey = pubKey
2268 return nil
2269}
2270
2271// look back to check existence of the node's consensus votes before joining consensus
2272func (cs *State) checkDoubleSigningRisk(height int64) error {

Callers 2

SetPrivValidatorMethod · 0.95
finalizeCommitMethod · 0.95

Calls 1

GetPubKeyMethod · 0.65

Tested by

no test coverage detected