multi: improve logging re resolution flow

This commit is contained in:
yyforyongyu
2023-08-09 17:30:52 +08:00
parent 8f693fe020
commit aff4320208
3 changed files with 24 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
package input
import (
"fmt"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
@@ -69,6 +71,11 @@ type TxInfo struct {
Weight int64
}
// String returns a human readable version of the tx info.
func (t *TxInfo) String() string {
return fmt.Sprintf("fee=%v, weight=%v", t.Fee, t.Weight)
}
// SignDetails is a struct containing information needed to resign certain
// inputs. It is used to re-sign 2nd level HTLC transactions that uses the
// SINGLE|ANYONECANPAY sighash type, as we have a signature provided by our