Skip to content

Commit ee22f42

Browse files
committed
rfq: add log message for QueryAskPrice endpoint usage
Log a message when querying the price oracle service via the `QueryAskPrice` endpoint to improve traceability and debugging.
1 parent 8a5bfad commit ee22f42

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rfq/negotiator.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ func (n *Negotiator) queryBidFromPriceOracle(assetSpecifier asset.Specifier,
119119
ctx, cancel := n.WithCtxQuitNoTimeout()
120120
defer cancel()
121121

122+
log.Debugf("Querying price oracle for bid price (asset_specifier=%s, "+
123+
"asset_max_amt=%s, payment_max_amt=%s, asset_rate_hint=%s)",
124+
assetSpecifier.String(), assetMaxAmt.String(),
125+
paymentMaxAmt.String(), assetRateHint.String())
126+
122127
oracleResponse, err := n.cfg.PriceOracle.QueryBidPrice(
123128
ctx, assetSpecifier, assetMaxAmt, paymentMaxAmt, assetRateHint,
124129
)
@@ -240,6 +245,11 @@ func (n *Negotiator) queryAskFromPriceOracle(assetSpecifier asset.Specifier,
240245
ctx, cancel := n.WithCtxQuitNoTimeout()
241246
defer cancel()
242247

248+
log.Debugf("Querying price oracle for ask price (asset_specifier=%s, "+
249+
"asset_max_amt=%s, payment_max_amt=%s, asset_rate_hint=%s)",
250+
assetSpecifier.String(), assetMaxAmt.String(),
251+
paymentMaxAmt.String(), assetRateHint.String())
252+
243253
oracleResponse, err := n.cfg.PriceOracle.QueryAskPrice(
244254
ctx, assetSpecifier, assetMaxAmt, paymentMaxAmt,
245255
assetRateHint,

0 commit comments

Comments
 (0)