multi: return input.Signature from SignOutputRaw

This commit is contained in:
Conner Fromknecht committed 2020-04-10 14:27:35 -07:00
1 parent 37dffb225a
commit 0f94b8dc62
29 files changed
+168 -110

No files matched your search

+4 -2
View File
@@ -50,7 +50,9 @@ type MockSigner struct {
// SignOutputRaw generates a signature for the passed transaction according to
// the data within the passed SignDescriptor.
func (m *MockSigner) SignOutputRaw(tx *wire.MsgTx, signDesc *SignDescriptor) ([]byte, error) {
func (m *MockSigner) SignOutputRaw(tx *wire.MsgTx,
signDesc *SignDescriptor) (Signature, error) {
pubkey := signDesc.KeyDesc.PubKey
switch {
case signDesc.SingleTweak != nil:
@@ -72,7 +74,7 @@ func (m *MockSigner) SignOutputRaw(tx *wire.MsgTx, signDesc *SignDescriptor) ([]
return nil, err
}
return sig[:len(sig)-1], nil
return btcec.ParseDERSignature(sig[:len(sig)-1], btcec.S256())
}
// ComputeInputScript generates a complete InputIndex for the passed transaction