Merge pull request #587 from hermeznetwork/feature/legacy-sync2

Update synchronizer.Sync2 to Sync from legacy impl
This commit is contained in:
Eduard S
2021-02-25 17:02:15 +01:00
committed by GitHub
5 changed files with 15 additions and 15 deletions

View File

@@ -558,7 +558,7 @@ func (n *Node) handleReorg(ctx context.Context, stats *synchronizer.Stats, vars
// TODO(Edu): Consider keeping the `lastBlock` inside synchronizer so that we
// don't have to pass it around.
func (n *Node) syncLoopFn(ctx context.Context, lastBlock *common.Block) (*common.Block, time.Duration, error) {
blockData, discarded, err := n.sync.Sync2(ctx, lastBlock)
blockData, discarded, err := n.sync.Sync(ctx, lastBlock)
stats := n.sync.Stats()
if err != nil {
// case: error