mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 19:46:22 +02:00
multi: return input.Signature from SignOutputRaw
This commit is contained in:
@@ -410,6 +410,14 @@ const (
|
||||
OfferedHtlcPenaltyWitnessSize = 1 + 1 + 73 + 1 + 33 + 1 + OfferedHtlcScriptSize
|
||||
)
|
||||
|
||||
type dummySignature struct{}
|
||||
|
||||
func (d *dummySignature) Serialize() []byte {
|
||||
// Always return worst-case signature length, excluding the one byte
|
||||
// sighash flag.
|
||||
return make([]byte, 73-1)
|
||||
}
|
||||
|
||||
// dummySigner is a fake signer used for size (upper bound) calculations.
|
||||
type dummySigner struct {
|
||||
Signer
|
||||
@@ -417,12 +425,10 @@ type dummySigner struct {
|
||||
|
||||
// SignOutputRaw generates a signature for the passed transaction according to
|
||||
// the data within the passed SignDescriptor.
|
||||
func (s *dummySigner) SignOutputRaw(tx *wire.MsgTx, signDesc *SignDescriptor) (
|
||||
[]byte, error) {
|
||||
func (s *dummySigner) SignOutputRaw(tx *wire.MsgTx,
|
||||
signDesc *SignDescriptor) (Signature, error) {
|
||||
|
||||
// Always return worst-case signature length, excluding the one byte
|
||||
// sighash flag.
|
||||
return make([]byte, 73-1), nil
|
||||
return &dummySignature{}, nil
|
||||
}
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user