1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-21 22:11:46 +01:00

(Minor) Log local inputs in interactive-tx (#2864)

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 <31281497+t-bast@users.noreply.github.com>
This commit is contained in:
Pierre-Marie Padiou 2024-06-11 16:12:03 +02:00 committed by GitHub
parent 3bb5f3e9f2
commit 40f13f4de5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)