Skip to content

Commit eecbdda

Browse files
committed
rpc: add raw_tx field to BumpFee response
This commit adds an optional include_raw_tx field to BumpFeeRequest and a raw_tx field to BumpFeeResponse. When include_raw_tx is set to true, the RPC will wait for the sweep transaction to be created and return its hex-encoded raw transaction. This allows users to manually broadcast transactions in cases where they don't propagate automatically, addressing issue #8470. Changes: - Add include_raw_tx bool field to BumpFeeRequest proto - Add raw_tx string field to BumpFeeResponse proto - Modify BumpFee implementation to optionally wait for sweep result - Update sweepNewInput to return result channel - Add --include_raw_tx flag to lncli wallet bumpfee command Closes #8470
1 parent 6a82c61 commit eecbdda

File tree

5 files changed

+503
-412
lines changed

5 files changed

+503
-412
lines changed

cmd/commands/walletrpc_active.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@ var bumpFeeCommand = cli.Command{
316316
required. When the deadline is reached, ALL the budget will be spent as
317317
fee.`,
318318
},
319+
cli.BoolFlag{
320+
Name: "include_raw_tx",
321+
Usage: `
322+
Whether to include the raw transaction hex in the response. This is
323+
useful for cases where the transaction does not propagate and the caller
324+
wants to manually broadcast it. Note that setting this to true will
325+
cause the command to block until the sweep transaction is created.`,
326+
},
319327
},
320328
Action: actionDecorator(bumpFee),
321329
}
@@ -359,6 +367,7 @@ func bumpFee(ctx *cli.Context) error {
359367
Budget: ctx.Uint64("budget"),
360368
SatPerVbyte: ctx.Uint64("sat_per_vbyte"),
361369
DeadlineDelta: uint32(ctx.Uint64("deadline_delta")),
370+
IncludeRawTx: ctx.Bool("include_raw_tx"),
362371
})
363372
if err != nil {
364373
return err

0 commit comments

Comments
 (0)