mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
fix: don't loop, reset genesis, shut off handlers on sigint
This commit is contained in:
parent
30a821da09
commit
ee7ff329d7
@ -137,7 +137,7 @@ var unlock *SignedGenesisUnlock
|
||||
func DownloadAndVerifyGenesis(network uint) (*SignedGenesisUnlock, error) {
|
||||
if network != 0 {
|
||||
unlock = &SignedGenesisUnlock{
|
||||
GenesisSeedHex: "726573697374206d7563682c206f626579206c6974746c657c000000000000000000000006",
|
||||
GenesisSeedHex: "726573697374206d7563682c206f626579206c6974746c657c000000000000000000000007",
|
||||
Beacon: []byte{
|
||||
0x58, 0xef, 0xd9, 0x7e, 0xdd, 0x0e, 0xb6, 0x2f,
|
||||
0x51, 0xc7, 0x5d, 0x00, 0x29, 0x12, 0x45, 0x49,
|
||||
|
||||
@ -78,7 +78,7 @@ func (e *DataClockConsensusEngine) processFrame(
|
||||
zap.Uint64("frame_number", dataFrame.FrameNumber),
|
||||
)
|
||||
var err error
|
||||
if !e.IsInProverTrie(e.provingKeyBytes) {
|
||||
if !e.GetFrameProverTries()[0].Contains(e.provingKeyBytes) {
|
||||
if latestFrame, err = e.collect(dataFrame); err != nil {
|
||||
e.logger.Error("could not collect", zap.Error(err))
|
||||
}
|
||||
@ -123,6 +123,6 @@ func (e *DataClockConsensusEngine) processFrame(
|
||||
e.logger.Info("announcing prover join")
|
||||
e.announceProverJoin()
|
||||
}
|
||||
return dataFrame
|
||||
return latestFrame
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,12 +13,13 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/anypb"
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/config"
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/consensus"
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/execution/intrinsics/token/application"
|
||||
"source.quilibrium.com/quilibrium/monorepo/node/protobufs"
|
||||
)
|
||||
|
||||
func (e *DataClockConsensusEngine) runFrameMessageHandler() {
|
||||
for {
|
||||
for e.state < consensus.EngineStateStopping {
|
||||
select {
|
||||
case message := <-e.frameMessageProcessorCh:
|
||||
e.logger.Debug("handling frame message")
|
||||
@ -54,7 +55,7 @@ func (e *DataClockConsensusEngine) runFrameMessageHandler() {
|
||||
}
|
||||
|
||||
func (e *DataClockConsensusEngine) runTxMessageHandler() {
|
||||
for {
|
||||
for e.state < consensus.EngineStateStopping {
|
||||
select {
|
||||
case message := <-e.txMessageProcessorCh:
|
||||
e.logger.Debug("handling tx message")
|
||||
@ -127,7 +128,7 @@ func (e *DataClockConsensusEngine) runTxMessageHandler() {
|
||||
}
|
||||
|
||||
func (e *DataClockConsensusEngine) runInfoMessageHandler() {
|
||||
for {
|
||||
for e.state < consensus.EngineStateStopping {
|
||||
select {
|
||||
case message := <-e.infoMessageProcessorCh:
|
||||
e.logger.Debug("handling info message")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user