Skip to content

Commit 5b19896

Browse files
committed
taprpc: support custom lock ID and expiration in CommitVirtualPsbts
This change extends the CommitVirtualPsbts RPC to accept an optional custom UTXO lock ID and lease expiration. By enabling callers to define these parameters explicitly, the wallet can better coordinate UTXO locking across concurrent workflows and provide safer, more flexible transaction retargeting when using virtual PSBTs. If unset, the default internal lock ID and 10-minute expiration remain in effect, preserving backward compatibility.
1 parent 3a82605 commit 5b19896

File tree

4 files changed

+271
-217
lines changed

4 files changed

+271
-217
lines changed

rpcserver.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -2481,8 +2481,10 @@ func (r *rpcServer) CommitVirtualPsbts(ctx context.Context,
24812481
Template: &walletrpc.FundPsbtRequest_CoinSelect{
24822482
CoinSelect: coinSelect,
24832483
},
2484-
MinConfs: 1,
2485-
ChangeType: P2TRChangeType,
2484+
MinConfs: 1,
2485+
ChangeType: P2TRChangeType,
2486+
CustomLockId: req.CustomLockId,
2487+
LockExpirationSeconds: req.LockExpirationSeconds,
24862488
}
24872489

24882490
// Unfortunately we can't use the same RPC types, so we have to do a

0 commit comments

Comments
 (0)