diff --git a/hathor/transaction/aux_pow.py b/hathor/transaction/aux_pow.py index 795d9a9f7..0a18ee2aa 100644 --- a/hathor/transaction/aux_pow.py +++ b/hathor/transaction/aux_pow.py @@ -58,8 +58,9 @@ def verify(self, _base_block_hash: bytes) -> None: raise AuxPowNoMagicError('cannot find MAGIC_NUMBER') if magic_index < len(self.coinbase_head) - len(MAGIC_NUMBER): raise AuxPowUnexpectedMagicError('unexpected MAGIC_NUMBER') - if len(self.merkle_path) > MAX_MERKLE_PATH_LENGTH: - raise AuxPowLongMerklePathError('`merkle_path` too long') + merkle_path_length = len(self.merkle_path) + if merkle_path_length > MAX_MERKLE_PATH_LENGTH: + raise AuxPowLongMerklePathError(f'merkle_path too long: {merkle_path_length} > {MAX_MERKLE_PATH_LENGTH}') def __bytes__(self) -> bytes: """ Convert to byte representation.