Skip to content

Commit 9828c21

Browse files
committed
Remove unexported error cases
Drop test cases for errors not exported by `bitcoinkernel.h` (`TxInputIndex`, `SpentOutputsMismatch`, `InvalidFlags`) to align with C API capabilities.
1 parent 13a9039 commit 9828c21

File tree

1 file changed

+0
-90
lines changed

1 file changed

+0
-90
lines changed

testdata/script_verify_errors.json

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -80,96 +80,6 @@
8080
}
8181
}
8282
},
83-
{
84-
"id": "error_tx_input_index_out_of_bounds",
85-
"description": "Input index exceeds the number of inputs in the transaction",
86-
"method": "btck_script_pubkey_verify",
87-
"params": {
88-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
89-
"amount": 0,
90-
"tx_to": "02000000013f7cebd65c27431a90bba7f796914fe8cc2ddfc3f2cbd6f7e5f2fc854534da95000000006b483045022100de1ac3bcdfb0332207c4a91f3832bd2c2915840165f876ab47c5f8996b971c3602201c6c053d750fadde599e6f5c4e1963df0f01fc0d97815e8157e3d59fe09ca30d012103699b464d1d8bc9e47d4fb1cdaa89a1c5783d68363c4dbc4b524ed3d857148617feffffff02836d3c01000000001976a914fc25d6d5c94003bf5b0c7b640a248e2c637fcfb088ac7ada8202000000001976a914fbed3d9b11183209a57999d54d59f67c019e756c88ac6acb0700",
91-
"input_index": 999,
92-
"flags": [
93-
"btck_ScriptVerificationFlags_P2SH",
94-
"btck_ScriptVerificationFlags_DERSIG",
95-
"btck_ScriptVerificationFlags_NULLDUMMY",
96-
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
97-
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
98-
"btck_ScriptVerificationFlags_WITNESS"
99-
],
100-
"spent_outputs": [
101-
{
102-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
103-
"amount": 100000
104-
}
105-
]
106-
},
107-
"expected": {
108-
"error": {
109-
"type": "ScriptVerify",
110-
"variant": "TxInputIndex"
111-
}
112-
}
113-
},
114-
{
115-
"id": "error_spent_outputs_mismatch",
116-
"description": "Spent outputs array length doesn't match transaction input count",
117-
"method": "btck_script_pubkey_verify",
118-
"params": {
119-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
120-
"amount": 0,
121-
"tx_to": "02000000013f7cebd65c27431a90bba7f796914fe8cc2ddfc3f2cbd6f7e5f2fc854534da95000000006b483045022100de1ac3bcdfb0332207c4a91f3832bd2c2915840165f876ab47c5f8996b971c3602201c6c053d750fadde599e6f5c4e1963df0f01fc0d97815e8157e3d59fe09ca30d012103699b464d1d8bc9e47d4fb1cdaa89a1c5783d68363c4dbc4b524ed3d857148617feffffff02836d3c01000000001976a914fc25d6d5c94003bf5b0c7b640a248e2c637fcfb088ac7ada8202000000001976a914fbed3d9b11183209a57999d54d59f67c019e756c88ac6acb0700",
122-
"input_index": 0,
123-
"flags": [
124-
"btck_ScriptVerificationFlags_P2SH",
125-
"btck_ScriptVerificationFlags_DERSIG",
126-
"btck_ScriptVerificationFlags_NULLDUMMY",
127-
"btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY",
128-
"btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY",
129-
"btck_ScriptVerificationFlags_WITNESS"
130-
],
131-
"spent_outputs": [
132-
{
133-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
134-
"amount": 100000
135-
},
136-
{
137-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
138-
"amount": 100000
139-
}
140-
]
141-
},
142-
"expected": {
143-
"error": {
144-
"type": "ScriptVerify",
145-
"variant": "SpentOutputsMismatch"
146-
}
147-
}
148-
},
149-
{
150-
"id": "error_invalid_flags",
151-
"description": "Verification flags contain invalid bits",
152-
"method": "btck_script_pubkey_verify",
153-
"params": {
154-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
155-
"amount": 0,
156-
"tx_to": "02000000013f7cebd65c27431a90bba7f796914fe8cc2ddfc3f2cbd6f7e5f2fc854534da95000000006b483045022100de1ac3bcdfb0332207c4a91f3832bd2c2915840165f876ab47c5f8996b971c3602201c6c053d750fadde599e6f5c4e1963df0f01fc0d97815e8157e3d59fe09ca30d012103699b464d1d8bc9e47d4fb1cdaa89a1c5783d68363c4dbc4b524ed3d857148617feffffff02836d3c01000000001976a914fc25d6d5c94003bf5b0c7b640a248e2c637fcfb088ac7ada8202000000001976a914fbed3d9b11183209a57999d54d59f67c019e756c88ac6acb0700",
157-
"input_index": 0,
158-
"flags": 4294967295,
159-
"spent_outputs": [
160-
{
161-
"script_pubkey": "76a9144bfbaf6afb76cc5771bc6404810d1cc041a6933988ac",
162-
"amount": 100000
163-
}
164-
]
165-
},
166-
"expected": {
167-
"error": {
168-
"type": "ScriptVerify",
169-
"variant": "InvalidFlags"
170-
}
171-
}
172-
},
17383
{
17484
"id": "error_invalid_flags_combination",
17585
"description": "VERIFY_WITNESS flag requires P2SH flag to be set as well",

0 commit comments

Comments
 (0)