File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ class BadInputOutpointIndex(BadTxTemplate):
134
134
# Won't be rejected - nonexistent outpoint index is treated as an orphan since the coins
135
135
# database can't distinguish between spent outpoints and outpoints which never existed.
136
136
reject_reason = None
137
+ # But fails in block
138
+ block_reject_reason = "bad-txns-inputs-missingorspent"
137
139
expect_disconnect = False
138
140
139
141
def get_tx (self ):
@@ -176,6 +178,8 @@ def get_tx(self):
176
178
class NonexistentInput (BadTxTemplate ):
177
179
reject_reason = None # Added as an orphan tx.
178
180
expect_disconnect = False
181
+ # But fails in block
182
+ block_reject_reason = "bad-txns-inputs-missingorspent"
179
183
180
184
def get_tx (self ):
181
185
tx = CTransaction ()
Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ def run_test(self):
161
161
if template .valid_in_block :
162
162
continue
163
163
164
+ assert template .block_reject_reason or template .reject_reason
165
+
164
166
self .log .info (f"Reject block with invalid tx: { TxTemplate .__name__ } " )
165
167
blockname = f"for_invalid.{ TxTemplate .__name__ } "
166
168
self .next_block (blockname )
You can’t perform that action at this time.
0 commit comments