* Test whether the script is standard by policy standards. * @returns {Boolean}
()
| 1750 | */ |
| 1751 | |
| 1752 | isStandard() { |
| 1753 | const [m, n] = this.getMultisig(); |
| 1754 | |
| 1755 | if (m !== -1) { |
| 1756 | if (n < 1 || n > 3) |
| 1757 | return false; |
| 1758 | |
| 1759 | if (m < 1 || m > n) |
| 1760 | return false; |
| 1761 | |
| 1762 | return true; |
| 1763 | } |
| 1764 | |
| 1765 | if (this.isNulldata()) |
| 1766 | return this.raw.length <= policy.MAX_OP_RETURN_BYTES; |
| 1767 | |
| 1768 | return this.getType() !== scriptTypes.NONSTANDARD; |
| 1769 | } |
| 1770 | |
| 1771 | /** |
| 1772 | * Calculate the size of the script |
nothing calls this directly
no test coverage detected