mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-23 11:27:25 +08:00
more small adjustments
This commit is contained in:
parent
d57757730d
commit
33015adc53
@ -201,16 +201,15 @@ func (e *DataClockConsensusEngine) handleClockFrame(
|
||||
return errors.Wrap(err, "handle clock frame data")
|
||||
}
|
||||
|
||||
for _, trie := range e.GetFrameProverTries()[:1] {
|
||||
if trie.Contains(addr.Bytes()) {
|
||||
e.logger.Info(
|
||||
"prover not in trie at frame, address may be in fork",
|
||||
zap.Binary("address", address),
|
||||
zap.Binary("filter", frame.Filter),
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
)
|
||||
return nil
|
||||
}
|
||||
trie := e.GetFrameProverTries()[0]
|
||||
if !trie.Contains(addr.Bytes()) {
|
||||
e.logger.Info(
|
||||
"prover not in trie at frame, address may be in fork",
|
||||
zap.Binary("address", address),
|
||||
zap.Binary("filter", frame.Filter),
|
||||
zap.Uint64("frame_number", frame.FrameNumber),
|
||||
)
|
||||
return nil
|
||||
}
|
||||
|
||||
e.logger.Info(
|
||||
|
||||
@ -101,6 +101,7 @@ func (e *DataClockConsensusEngine) HandlePreMidnightMint(
|
||||
) (*protobufs.PreMidnightMintResponse, error) {
|
||||
addr, err := e.handleMint(t)
|
||||
if err != nil {
|
||||
e.logger.Error("error while handling pre-midnight mint", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -222,6 +223,11 @@ func (e *DataClockConsensusEngine) handleMint(
|
||||
return nil, errors.Wrap(application.ErrInvalidStateTransition, "handle mint")
|
||||
}
|
||||
|
||||
e.logger.Debug(
|
||||
"got pre-midnight mint request",
|
||||
zap.String("peer", peerId.String()),
|
||||
)
|
||||
|
||||
if len(t.Proofs) >= 3 &&
|
||||
len(t.Proofs) < 204 &&
|
||||
bytes.Equal(
|
||||
|
||||
@ -64,8 +64,8 @@ func (e *DataClockConsensusEngine) runPreMidnightProofWorker() {
|
||||
for {
|
||||
tries := e.GetFrameProverTries()
|
||||
|
||||
if len(tries) == 0 {
|
||||
e.logger.Info("waiting for more frame info to appear")
|
||||
if len(tries) == 0 || e.pubSub.GetNetworkPeersCount() < 3 {
|
||||
e.logger.Info("waiting for more peer info to appear")
|
||||
time.Sleep(10 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user