Skip to content

Commit 6d844b9

Browse files
committed
review changes
1 parent fc3b0c6 commit 6d844b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hathor/verification/verification_service.py

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def verify_basic(self, vertex: BaseTransaction, *, skip_block_weight_verificatio
100100
"""Basic verifications (the ones without access to dependencies: parents+inputs). Raises on error.
101101
102102
Used by `self.validate_basic`. Should not modify the validation state."""
103+
# We assert with type() instead of isinstance() because each subclass has a specific branch.
103104
match vertex.version:
104105
case TxVersion.REGULAR_BLOCK:
105106
assert type(vertex) is Block
@@ -126,6 +127,7 @@ def verify(self, vertex: BaseTransaction, *, reject_locked_reward: bool = True)
126127
"""Run all verifications. Raises on error.
127128
128129
Used by `self.validate_full`. Should not modify the validation state."""
130+
# We assert with type() instead of isinstance() because each subclass has a specific branch.
129131
match vertex.version:
130132
case TxVersion.REGULAR_BLOCK:
131133
assert type(vertex) is Block
@@ -143,6 +145,7 @@ def verify(self, vertex: BaseTransaction, *, reject_locked_reward: bool = True)
143145
assert_never(vertex.version)
144146

145147
def verify_without_storage(self, vertex: BaseTransaction) -> None:
148+
# We assert with type() instead of isinstance() because each subclass has a specific branch.
146149
match vertex.version:
147150
case TxVersion.REGULAR_BLOCK:
148151
assert type(vertex) is Block

0 commit comments

Comments
 (0)