@@ -73,9 +73,6 @@ class BadTxTemplate:
7373 # Only specified if it differs from mempool acceptance error.
7474 block_reject_reason = ""
7575
76- # Do we expect to be disconnected after submitting this tx?
77- expect_disconnect = False
78-
7976 # Is this tx considered valid when included in a block, but not for acceptance into
8077 # the mempool (i.e. does it violate policy but not consensus)?
8178 valid_in_block = False
@@ -93,7 +90,6 @@ def get_tx(self, *args, **kwargs):
9390
9491class OutputMissing (BadTxTemplate ):
9592 reject_reason = "bad-txns-vout-empty"
96- expect_disconnect = False
9793
9894 def get_tx (self ):
9995 tx = CTransaction ()
@@ -103,7 +99,6 @@ def get_tx(self):
10399
104100class InputMissing (BadTxTemplate ):
105101 reject_reason = "bad-txns-vin-empty"
106- expect_disconnect = False
107102
108103 # We use a blank transaction here to make sure
109104 # it is interpreted as a non-witness transaction.
@@ -119,7 +114,6 @@ def get_tx(self):
119114# tree depth commitment (CVE-2017-12842)
120115class SizeTooSmall (BadTxTemplate ):
121116 reject_reason = "tx-size-small"
122- expect_disconnect = False
123117 valid_in_block = True
124118
125119 def get_tx (self ):
@@ -137,7 +131,6 @@ class BadInputOutpointIndex(BadTxTemplate):
137131 reject_reason = None
138132 # But fails in block
139133 block_reject_reason = "bad-txns-inputs-missingorspent"
140- expect_disconnect = False
141134
142135 def get_tx (self ):
143136 num_indices = len (self .spend_tx .vin )
@@ -151,7 +144,6 @@ def get_tx(self):
151144
152145class DuplicateInput (BadTxTemplate ):
153146 reject_reason = 'bad-txns-inputs-duplicate'
154- expect_disconnect = False
155147
156148 def get_tx (self ):
157149 tx = CTransaction ()
@@ -163,7 +155,6 @@ def get_tx(self):
163155
164156class PrevoutNullInput (BadTxTemplate ):
165157 reject_reason = 'bad-txns-prevout-null'
166- expect_disconnect = False
167158
168159 def get_tx (self ):
169160 tx = CTransaction ()
@@ -175,7 +166,6 @@ def get_tx(self):
175166
176167class NonexistentInput (BadTxTemplate ):
177168 reject_reason = None # Added as an orphan tx.
178- expect_disconnect = False
179169 # But fails in block
180170 block_reject_reason = "bad-txns-inputs-missingorspent"
181171
@@ -189,7 +179,6 @@ def get_tx(self):
189179
190180class SpendTooMuch (BadTxTemplate ):
191181 reject_reason = 'bad-txns-in-belowout'
192- expect_disconnect = False
193182
194183 def get_tx (self ):
195184 return create_tx_with_script (
@@ -198,23 +187,20 @@ def get_tx(self):
198187
199188class CreateNegative (BadTxTemplate ):
200189 reject_reason = 'bad-txns-vout-negative'
201- expect_disconnect = False
202190
203191 def get_tx (self ):
204192 return create_tx_with_script (self .spend_tx , 0 , amount = - 1 )
205193
206194
207195class CreateTooLarge (BadTxTemplate ):
208196 reject_reason = 'bad-txns-vout-toolarge'
209- expect_disconnect = False
210197
211198 def get_tx (self ):
212199 return create_tx_with_script (self .spend_tx , 0 , amount = MAX_MONEY + 1 )
213200
214201
215202class CreateSumTooLarge (BadTxTemplate ):
216203 reject_reason = 'bad-txns-txouttotal-toolarge'
217- expect_disconnect = False
218204
219205 def get_tx (self ):
220206 tx = create_tx_with_script (self .spend_tx , 0 , amount = MAX_MONEY )
@@ -224,7 +210,6 @@ def get_tx(self):
224210
225211class InvalidOPIFConstruction (BadTxTemplate ):
226212 reject_reason = "mempool-script-verify-flag-failed (Invalid OP_IF construction)"
227- expect_disconnect = False
228213
229214 def get_tx (self ):
230215 return create_tx_with_script (
@@ -235,7 +220,6 @@ def get_tx(self):
235220class TooManySigopsPerBlock (BadTxTemplate ):
236221 reject_reason = "bad-txns-too-many-sigops"
237222 block_reject_reason = "bad-blk-sigops, out-of-bounds SigOpCount"
238- expect_disconnect = False
239223
240224 def get_tx (self ):
241225 lotsa_checksigs = CScript ([OP_CHECKSIG ] * (MAX_BLOCK_SIGOPS ))
@@ -247,7 +231,6 @@ def get_tx(self):
247231
248232class TooManySigopsPerTransaction (BadTxTemplate ):
249233 reject_reason = "bad-txns-too-many-sigops"
250- expect_disconnect = False
251234 valid_in_block = True
252235
253236 def get_tx (self ):
@@ -270,7 +253,6 @@ def get_tx(self):
270253
271254 return type ('DisabledOpcode_' + str (opcode ), (BadTxTemplate ,), {
272255 'reject_reason' : "disabled opcode" ,
273- 'expect_disconnect' : True ,
274256 'get_tx' : get_tx ,
275257 'valid_in_block' : False
276258 })
@@ -279,7 +261,6 @@ class NonStandardAndInvalid(BadTxTemplate):
279261 """A non-standard transaction which is also consensus-invalid should return the first error."""
280262 reject_reason = "mempool-script-verify-flag-failed (Using OP_CODESEPARATOR in non-witness script)"
281263 block_reject_reason = "mandatory-script-verify-flag-failed (OP_RETURN was encountered)"
282- expect_disconnect = False
283264 valid_in_block = False
284265
285266 def get_tx (self ):
0 commit comments