mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-25 08:05:17 +00:00
fix: handle large consensus batches
This commit is contained in:
parent
520d6562f9
commit
5bce33216f
@ -687,12 +687,12 @@ func (e *CeremonyDataClockConsensusEngine) commitLongestPath(
|
|||||||
zap.Int("commit_depth", len(runningFrames[0])),
|
zap.Int("commit_depth", len(runningFrames[0])),
|
||||||
)
|
)
|
||||||
|
|
||||||
txn, err := e.clockStore.NewTransaction()
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrap(err, "commit longest path")
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, s := range runningFrames[0][1:] {
|
for _, s := range runningFrames[0][1:] {
|
||||||
|
txn, err := e.clockStore.NewTransaction()
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrap(err, "commit longest path")
|
||||||
|
}
|
||||||
|
|
||||||
e.logger.Info(
|
e.logger.Info(
|
||||||
"committing candidate",
|
"committing candidate",
|
||||||
zap.Uint64("frame_number", s.FrameNumber),
|
zap.Uint64("frame_number", s.FrameNumber),
|
||||||
@ -796,14 +796,14 @@ func (e *CeremonyDataClockConsensusEngine) commitLongestPath(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if err := txn.Commit(); err != nil {
|
if err := txn.Commit(); err != nil {
|
||||||
e.logger.Error(
|
e.logger.Error(
|
||||||
"could not commit candidates",
|
"could not commit candidates",
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
)
|
)
|
||||||
return nil, errors.Wrap(err, "commit longest path")
|
return nil, errors.Wrap(err, "commit longest path")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
runningFrames = [][]*protobufs.ClockFrame{
|
runningFrames = [][]*protobufs.ClockFrame{
|
||||||
|
Loading…
Reference in New Issue
Block a user