Stop master clock spin (#334)

This commit is contained in:
petricadaipegsp 2024-11-06 11:04:06 +01:00 committed by GitHub
parent f3e502a2d1
commit b3cc442efd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,7 @@
package master
import (
"bytes"
gcrypto "crypto"
"encoding/hex"
"math/big"
@ -228,6 +229,10 @@ func (e *MasterClockConsensusEngine) Start() <-chan error {
}()
go func() {
if !bytes.Equal(e.pubSub.GetPeerID(), []byte(e.beacon)) {
return
}
for e.state < consensus.EngineStateStopping {
frame, err := e.masterTimeReel.Head()
if err != nil {