From b13cceac3b25eff9873650618b238d3f0c86b569 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ros=C5=82aniec?=
Date: Fri, 7 Aug 2026 14:51:07 +0000
Subject: [PATCH] fix(tbtcpg): use RedemptionParameters struct return, not old
8-tuple
GetRedemptionParameters() was refactored in c4cc0addd to return a single
tbtc.RedemptionParameters struct + error, but a same-day divergent branch
(ad89b38d9/6a7060800) added a new call site still using the old 8-value
positional destructuring. Neither commit was an ancestor of the other; the
merge that combined them didn't catch the mismatch, breaking the build on
main (client-scan, client-vet, client-lint, client-build-test-publish all
fail on GetRedemptionParameters returns 2 values, not 8).
---
pkg/tbtcpg/redemptions.go | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pkg/tbtcpg/redemptions.go b/pkg/tbtcpg/redemptions.go
index a52d00eeb9..7474d6cf49 100644
--- a/pkg/tbtcpg/redemptions.go
+++ b/pkg/tbtcpg/redemptions.go
@@ -222,7 +222,7 @@ func (rt *RedemptionTask) ProposeRedemption(
if fee <= 0 {
taskLogger.Infof("estimating redemption transaction fee")
- _, _, txMaxFee, txMaxTotalFee, _, _, _, err := rt.chain.GetRedemptionParameters()
+ redemptionParameters, err := rt.chain.GetRedemptionParameters()
if err != nil {
return nil, fmt.Errorf(
"cannot get redemption tx max total fee: [%w]",
@@ -233,7 +233,7 @@ func (rt *RedemptionTask) ProposeRedemption(
estimatedFee, err := EstimateRedemptionFee(
rt.btcChain,
redeemersOutputScripts,
- txMaxTotalFee,
+ redemptionParameters.TxMaxTotalFee,
)
if err != nil {
return nil, fmt.Errorf(
@@ -259,13 +259,13 @@ func (rt *RedemptionTask) ProposeRedemption(
// diagnostic rather than an exact predictor.
requestsCount := int64(len(redeemersOutputScripts))
maxShare := fee/requestsCount + fee%requestsCount
- if uint64(maxShare) > txMaxFee {
+ if uint64(maxShare) > redemptionParameters.TxMaxFee {
taskLogger.Warnf(
"floored redemption fee share [%d] exceeds the per-request "+
"maximum fee [%d]; the proposal will likely be rejected "+
"by on-chain validation",
maxShare,
- txMaxFee,
+ redemptionParameters.TxMaxFee,
)
}
}