This adds support for identifying if a signature script likely consists of a pay-to-script-hash multi-signature redeem script for an original pay-to-script-hash script as a convenience method for consumers of the package. Note that this is different in that it applies to the signature script as opposed to the public key script and consequently there is no new script type introduced nor does the overall script determination detect it. This is the case because determining if a signature script is actually a redemption of pay-to-script-hash requires the associated public key script which is often expensive to obtain. Therefore, this makes a fast best effort guess that has a high probability of being correct by checking if the signature script ends with a data push and treating that data push as if it were a p2sh redeem script. Also of note is that the same change in semantics regarding compressed public keys and the required number of signatures as described in the commit which introduced support for detecting version 0 ecdsa multisignature scripts applies here. Full test coverage is included. This is part of a series of commits to fully implement the stdscript package. |
||
|---|---|---|
| .. | ||
| error_test.go | ||
| error.go | ||
| script_bench_test.go | ||
| script_test.go | ||
| script.go | ||
| scriptshortform_test.go | ||
| scriptv0_test.go | ||
| scriptv0.go | ||