test: ensure reason is checked for invalid blocks rejection
This commit is contained in:
1 parent
1a689a2c88
commit
8fcd684505
2 files changed
+6
No files matched your search
@@ -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