Skip to content

Commit

Permalink
(Minor) Log local inputs in interactive-tx (#2864)
Browse files Browse the repository at this point in the history
We do log all incoming/outgoing messages, including `TxAddInput`, but
the `toString()` prints the whole serialized tx, not the txid, making
grepping more difficult.

Co-authored-by: Bastien Teinturier <[email protected]>
  • Loading branch information
pm47 and t-bast committed Jun 11, 2024
1 parent 3bb5f3e commit 40f13f4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,10 @@ private class InteractiveTxBuilder(replyTo: ActorRef[InteractiveTxBuilder.Respon
session.toSend match {
case (addInput: Input) +: tail =>
val message = addInput match {
case i: Input.Local => TxAddInput(fundingParams.channelId, i.serialId, Some(i.previousTx), i.previousTxOutput, i.sequence)
case i: Input.Local =>
// for debugging wallet locking issues, it is useful to log local utxos
log.info(s"adding local input ${i.previousTx.txid}:${i.previousTxOutput} to interactive-tx")
TxAddInput(fundingParams.channelId, i.serialId, Some(i.previousTx), i.previousTxOutput, i.sequence)
case i: Input.Shared => TxAddInput(fundingParams.channelId, i.serialId, i.outPoint, i.sequence)
}
replyTo ! SendMessage(sessionId, message)
Expand Down

0 comments on commit 40f13f4

Please sign in to comment.