mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-24 06:57:51 +01:00
Adding generator and spec for P2WSH(P2PKH) witness txs
This commit is contained in:
parent
05f3b5fefc
commit
e99a9f1602
1 changed files with 7 additions and 0 deletions
|
@ -101,6 +101,13 @@ class TransactionSignatureCreatorSpec extends Properties("TransactionSignatureCr
|
|||
}
|
||||
|
||||
property("generate a valid signature for a p2wsh(p2pk) witness transaction") =
|
||||
Prop.forAllNoShrink(TransactionGenerators.signedP2WSHP2PKTransaction) { case (wtxSigComponent, privKeys) =>
|
||||
val program = ScriptProgram(wtxSigComponent)
|
||||
val result = ScriptInterpreter.run(program)
|
||||
result == ScriptOk
|
||||
}
|
||||
|
||||
property("generate a vallid signature for a p2wsh(p2pkh) witness transaction") =
|
||||
Prop.forAllNoShrink(TransactionGenerators.signedP2WSHP2PKHTransaction) { case (wtxSigComponent, privKeys) =>
|
||||
val program = ScriptProgram(wtxSigComponent)
|
||||
val result = ScriptInterpreter.run(program)
|
||||
|
|
Loading…
Add table
Reference in a new issue