Skip to content

Commit

Permalink
rfq: add log message for QueryAskPrice endpoint usage
Browse files Browse the repository at this point in the history
Log a message when querying the price oracle service via the
`QueryAskPrice` endpoint to improve traceability and debugging.
  • Loading branch information
ffranr committed Jan 6, 2025
1 parent 8a5bfad commit ee22f42
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rfq/negotiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ func (n *Negotiator) queryBidFromPriceOracle(assetSpecifier asset.Specifier,
ctx, cancel := n.WithCtxQuitNoTimeout()
defer cancel()

log.Debugf("Querying price oracle for bid price (asset_specifier=%s, "+
"asset_max_amt=%s, payment_max_amt=%s, asset_rate_hint=%s)",
assetSpecifier.String(), assetMaxAmt.String(),
paymentMaxAmt.String(), assetRateHint.String())

oracleResponse, err := n.cfg.PriceOracle.QueryBidPrice(
ctx, assetSpecifier, assetMaxAmt, paymentMaxAmt, assetRateHint,
)
Expand Down Expand Up @@ -240,6 +245,11 @@ func (n *Negotiator) queryAskFromPriceOracle(assetSpecifier asset.Specifier,
ctx, cancel := n.WithCtxQuitNoTimeout()
defer cancel()

log.Debugf("Querying price oracle for ask price (asset_specifier=%s, "+
"asset_max_amt=%s, payment_max_amt=%s, asset_rate_hint=%s)",
assetSpecifier.String(), assetMaxAmt.String(),
paymentMaxAmt.String(), assetRateHint.String())

oracleResponse, err := n.cfg.PriceOracle.QueryAskPrice(
ctx, assetSpecifier, assetMaxAmt, paymentMaxAmt,
assetRateHint,
Expand Down

0 comments on commit ee22f42

Please sign in to comment.