From 60510bfd74f196f27330a9f5f5a68f9f1123e4bf Mon Sep 17 00:00:00 2001 From: Daniel Wasserman Date: Wed, 23 Oct 2024 10:26:49 -0700 Subject: [PATCH 1/3] Fix: skip db cache wherever fetching committable balances --- services/rfq/relayer/inventory/manager.go | 2 +- services/rfq/relayer/service/handlers.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/rfq/relayer/inventory/manager.go b/services/rfq/relayer/inventory/manager.go index 931bc084f1..04fbea754d 100644 --- a/services/rfq/relayer/inventory/manager.go +++ b/services/rfq/relayer/inventory/manager.go @@ -455,7 +455,7 @@ func (i *inventoryManagerImpl) HasSufficientGas(parentCtx context.Context, chain span.SetAttributes(attribute.String("gas_value", gasValue.String())) } - gasBalance, err := i.GetCommittableBalance(ctx, chainID, util.EthAddress) + gasBalance, err := i.GetCommittableBalance(ctx, chainID, util.EthAddress, SkipDBCache()) if err != nil { return false, fmt.Errorf("error getting committable gas on origin: %w", err) } diff --git a/services/rfq/relayer/service/handlers.go b/services/rfq/relayer/service/handlers.go index dbba3dea6e..07b3360be2 100644 --- a/services/rfq/relayer/service/handlers.go +++ b/services/rfq/relayer/service/handlers.go @@ -217,7 +217,7 @@ func (q *QuoteRequestHandler) commitPendingBalance(ctx context.Context, span tra defer unlocker.Unlock() // get destination committable balance - committableBalance, err := q.Inventory.GetCommittableBalance(ctx, int(q.Dest.ChainID), request.Transaction.DestToken) + committableBalance, err := q.Inventory.GetCommittableBalance(ctx, int(q.Dest.ChainID), request.Transaction.DestToken, inventory.SkipDBCache()) if errors.Is(err, inventory.ErrUnsupportedChain) { // don't process request if chain is currently unsupported span.AddEvent("dropping unsupported chain") @@ -626,7 +626,7 @@ func (q *QuoteRequestHandler) handleNotEnoughInventory(ctx context.Context, span defer unlocker.Unlock() // commit destination balance - committableBalance, err := q.Inventory.GetCommittableBalance(ctx, int(q.Dest.ChainID), request.Transaction.DestToken) + committableBalance, err := q.Inventory.GetCommittableBalance(ctx, int(q.Dest.ChainID), request.Transaction.DestToken, inventory.SkipDBCache()) if err != nil { return fmt.Errorf("could not get committable balance: %w", err) } From b118ff95aa48746c3bba4e1342832e85cc9ff95c Mon Sep 17 00:00:00 2001 From: Daniel Wasserman Date: Wed, 23 Oct 2024 10:26:51 -0700 Subject: [PATCH 2/3] [goreleaser] From 857d13713bf8b1e31e58ed6ca9d9d164bac56014 Mon Sep 17 00:00:00 2001 From: Daniel Wasserman Date: Fri, 25 Oct 2024 13:39:03 -0700 Subject: [PATCH 3/3] [goreleaser]