(t *testing.T)
| 748 | } |
| 749 | |
| 750 | func TestScript_IsStandardScriptPubKey_Error(t *testing.T) { |
| 751 | pubKeysData := []string{ |
| 752 | "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", |
| 753 | "038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", |
| 754 | "03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", |
| 755 | } |
| 756 | |
| 757 | var wantPubKeys [][]byte |
| 758 | |
| 759 | wantPubKeyType := ScriptNonStandard |
| 760 | wantPubKeys = nil |
| 761 | wantIsStandard := false |
| 762 | |
| 763 | testScript := NewEmptyScript() |
| 764 | for _, v := range pubKeysData { |
| 765 | testScript.PushSingleData(hexToBytes(v)) |
| 766 | } |
| 767 | testScript.PushInt64(3) |
| 768 | testScript.PushOpCode(OP_CHECKMULTISIG) |
| 769 | |
| 770 | pubKeyType, pubKeys, isStandard := testScript.IsStandardScriptPubKey() |
| 771 | |
| 772 | assert.Equal(t, wantPubKeyType, pubKeyType) |
| 773 | assert.Equal(t, wantPubKeys, pubKeys) |
| 774 | assert.Equal(t, wantIsStandard, isStandard) |
| 775 | } |
| 776 | |
| 777 | func TestScript_CheckScriptSigStandard_ScriptPubKeyHash(t *testing.T) { |
| 778 | wantPubkeyType := ScriptPubkeyHash |
nothing calls this directly
no test coverage detected