hasTaprootScriptTest returns whether the reference script test is one of the newer taproot cases embedded in script_tests.json. Those vectors rely on Bitcoin Core-specific placeholder macros, while btcd covers taproot via the dedicated data/taproot-ref harness in TestTaprootReferenceTests.
(test []interface{})
| 388 | // Bitcoin Core-specific placeholder macros, while btcd covers taproot via the |
| 389 | // dedicated data/taproot-ref harness in TestTaprootReferenceTests. |
| 390 | func hasTaprootScriptTest(test []interface{}) bool { |
| 391 | // Account for any optional leading witness data. |
| 392 | witnessOffset := scriptTestWitnessOffset(test) |
| 393 | |
| 394 | if len(test) < witnessOffset+scriptTestFlagsOffset+1 { |
| 395 | return false |
| 396 | } |
| 397 | |
| 398 | flags, ok := test[witnessOffset+scriptTestFlagsOffset].(string) |
| 399 | return ok && strings.Contains(flags, "TAPROOT") |
| 400 | } |
| 401 | |
| 402 | // parseExpectedResult parses the provided expected result string into allowed |
| 403 | // script error codes. An error is returned if the expected result string is |
no test coverage detected
searching dependent graphs…