Skip to content

Commit

Permalink
Fallback to feeder traces for blocks <= 0.12.2
Browse files Browse the repository at this point in the history
there was social consensus on this
  • Loading branch information
omerfirmak committed Nov 3, 2023
1 parent 4a8e44b commit 5df9c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpc/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ func (h *Handler) LegacyTraceBlockTransactions(ctx context.Context, hash felt.Fe
return h.traceBlockTransactions(ctx, block, true)
}

var traceFallbackVersion = semver.MustParse("0.12.0")
var traceFallbackVersion = semver.MustParse("0.12.2")

func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block, //nolint: gocyclo
legacyJSON bool,
Expand All @@ -1384,7 +1384,7 @@ func (h *Handler) traceBlockTransactions(ctx context.Context, block *core.Block,
if blockVer, err := core.ParseBlockVersion(block.ProtocolVersion); err != nil {
return nil, ErrUnexpectedError.CloneWithData(err.Error())
} else if blockVer.Compare(traceFallbackVersion) != 1 {
// version <= 0.12.0
// version <= 0.12.2
return h.fetchTraces(ctx, block.Hash, legacyJSON)
}

Expand Down

0 comments on commit 5df9c12

Please sign in to comment.