services/rfq/guard/service/handlers.go
Method Guard.handleProveCalled
has 11 return statements (exceeds 4 allowed). Open
Open
func (g *Guard) handleProveCalled(parentCtx context.Context, proven *guarddb.PendingProven) (err error) {
ctx, span := g.metrics.Tracer().Start(parentCtx, "handleProveCalled", trace.WithAttributes(
attribute.String("transaction_id", hexutil.Encode(proven.TransactionID[:])),
))
defer func() {
Function relayMatchesBridgeRequest
has 8 return statements (exceeds 4 allowed). Open
Open
func relayMatchesBridgeRequest(event *fastbridge.FastBridgeBridgeRelayed, bridgeRequest *guarddb.BridgeRequest) bool {
// TODO: is this exhaustive?
if event.TransactionId != bridgeRequest.TransactionID {
return false
}
Method Guard.handleBridgeRequestedLog
has 7 return statements (exceeds 4 allowed). Open
Open
func (g *Guard) handleBridgeRequestedLog(parentCtx context.Context, req *fastbridge.FastBridgeBridgeRequested, chainID int) (err error) {
ctx, span := g.metrics.Tracer().Start(parentCtx, "handleBridgeRequestedLog-guard", trace.WithAttributes(
attribute.Int(metrics.Origin, chainID),
attribute.String("transaction_id", hexutil.Encode(req.TransactionId[:])),
))
Method Guard.isProveValid
has 7 return statements (exceeds 4 allowed). Open
Open
func (g *Guard) isProveValid(ctx context.Context, proven *guarddb.PendingProven, bridgeRequest *guarddb.BridgeRequest) (bool, error) {
span := trace.SpanFromContext(ctx)
// get the receipt for this tx on dest chain
chainClient, err := g.client.GetChainClient(ctx, int(bridgeRequest.Transaction.DestChainId))