IsPayToScriptHash returns true if the script is in the standard pay-to-script-hash (P2SH) format, false otherwise. WARNING: This function always treats the passed script as version 0. Great care must be taken if introducing a new script version because it is used in consensus which, unfortunately
(script []byte)
| 71 | // script versions before determining if the script is a P2SH which means nodes |
| 72 | // on existing rules will analyze new version scripts as if they were version 0. |
| 73 | func IsPayToScriptHash(script []byte) bool { |
| 74 | return isScriptHashScript(script) |
| 75 | } |
| 76 | |
| 77 | // IsPayToWitnessScriptHash returns true if the script is in the standard |
| 78 | // pay-to-witness-script-hash (P2WSH) format, false otherwise. |
searching dependent graphs…