mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-14 16:50:17 +02:00
test: ensure reason is checked for invalid blocks rejection
This commit is contained in:
@@ -134,6 +134,8 @@ class BadInputOutpointIndex(BadTxTemplate):
|
||||
# Won't be rejected - nonexistent outpoint index is treated as an orphan since the coins
|
||||
# database can't distinguish between spent outpoints and outpoints which never existed.
|
||||
reject_reason = None
|
||||
# But fails in block
|
||||
block_reject_reason = "bad-txns-inputs-missingorspent"
|
||||
expect_disconnect = False
|
||||
|
||||
def get_tx(self):
|
||||
@@ -176,6 +178,8 @@ class PrevoutNullInput(BadTxTemplate):
|
||||
class NonexistentInput(BadTxTemplate):
|
||||
reject_reason = None # Added as an orphan tx.
|
||||
expect_disconnect = False
|
||||
# But fails in block
|
||||
block_reject_reason = "bad-txns-inputs-missingorspent"
|
||||
|
||||
def get_tx(self):
|
||||
tx = CTransaction()
|
||||
|
||||
Reference in New Issue
Block a user