Multi-sig ScriptSig Support #143
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Depends on #140.
Resolves #137.
Related to #90.
The following pull request adds the following script templates to
Script:Script.createP2SHMultisigScriptSig,Script.createP2SHScriptSig, andScript.createMultisigScriptSigIt only adds a single test for
Script.createP2SHMultisigScriptSig, which is woeful, however it is none the less an improvement over the previous situation which had a broken implementation with no tests.I plan on adding more tests for each of these functions as soon as possible, but this is the intermediate fix that allows for
pay-to-scriptHashscriptSigs to be generated correctly.The function
Script.createMultiSigInputScriptwas renamed toScript.createP2SHMultisigScriptSig.The test
should create valid multi-sig addresswas removed because it was identical in coverage to the next testshould create valid redeemScript. This is because theredeemScriptis confirmed as valid if it matches the expectedcrypto.hash160(redeemScript).I'd be curious to hear opinions on whether the naming convention of
*ScriptSigand*ScriptPubKeyis more idiomatic than the current:*InputScriptand*OutputScript.I personally find the latter misleading, but that could just be my opinion.