From 071648f76967ae272f4770ae8281c17a1832db9a Mon Sep 17 00:00:00 2001 From: pfi79 Date: Mon, 17 Jul 2023 13:29:40 +0300 Subject: [PATCH] remove code which delete id from pool request after sync (#559) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Фёдор Партанский --- internal/bft/controller.go | 11 ----------- pkg/types/types.go | 5 ++--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/internal/bft/controller.go b/internal/bft/controller.go index 0a418681..b3af84d0 100644 --- a/internal/bft/controller.go +++ b/internal/bft/controller.go @@ -6,7 +6,6 @@ package bft import ( - "errors" "sync" "sync/atomic" "time" @@ -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") diff --git a/pkg/types/types.go b/pkg/types/types.go index c58eb387..83851bc0 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -111,9 +111,8 @@ type Reconfig struct { } type SyncResponse struct { - Latest Decision - Reconfig ReconfigSync - RequestDel []RequestInfo + Latest Decision + Reconfig ReconfigSync } type ReconfigSync struct {