Skip to content

Commit

Permalink
remove code which delete id from pool request after sync (#559)
Browse files Browse the repository at this point in the history
Signed-off-by: Фёдор Партанский <[email protected]>
  • Loading branch information
pfi79 authored Jul 17, 2023
1 parent 39ad622 commit 071648f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
11 changes: 0 additions & 11 deletions internal/bft/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package bft

import (
"errors"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -598,16 +597,6 @@ func (c *Controller) sync() (viewNum uint64, seq uint64, decisions uint64) {
c.ViewChanger.close()
}

if len(syncResponse.RequestDel) != 0 {
c.RequestPool.Prune(func(bytes []byte) error {
return errors.New("need all delete")
})

for i := range syncResponse.RequestDel {
_ = c.RequestPool.RemoveRequest(syncResponse.RequestDel[i])
}
}

decision := syncResponse.Latest
if decision.Proposal.Metadata == nil {
c.Logger.Infof("Synchronizer returned with proposal metadata nil")
Expand Down
5 changes: 2 additions & 3 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ type Reconfig struct {
}

type SyncResponse struct {
Latest Decision
Reconfig ReconfigSync
RequestDel []RequestInfo
Latest Decision
Reconfig ReconfigSync
}

type ReconfigSync struct {
Expand Down

0 comments on commit 071648f

Please sign in to comment.