Skip to content

Title: AttributeError: 'int' object has no attribute 'hash' in xmrtype.py during scan execution #6

@afungible

Description

@afungible

Hi Jeffro, thanks for the great tool.

While running xmr-haystack on my wallet dump, I encountered a recurring crash during the scanning phase. Here's the traceback:

While running this xmr_haystack script, the script terminated,

Found tx: 997c223a5ff9958a9040c1e67fcb56f55ce2b0335e146270198ee2ea354e6745
Found tx: 997c223a5ff9958a9040c1e67fcb56f55ce2b0335e146270198ee2ea354e6745
Found tx: 997c223a5ff9958a9040c1e67fcb56f55ce2b0335e146270198ee2ea354e6745
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "~/Thirdparty/xmr-haystack/xmr-haystack/src/xmr-haystack/__main__.py", line 300, in <module>
    exitcode = main()
  File "~/Thirdparty/xmr-haystack/xmr-haystack/src/xmr-haystack/__main__.py", line 91, in main
    scan(start_height, end_height, daemon, settings, pubkey_by_index, txs_by_key_index, scanned_blocks)
  File "~/Thirdparty/xmr-haystack/xmr-haystack/src/xmr-haystack/__main__.py", line 169, in scan
    if kindex in txs_by_key_index:
  File "~/Thirdparty/xmr-haystack/xmr-haystack/src/xmr-haystack/xmrtype.py", line 82, in __eq__
    return self.hash == other.hash
AttributeError: 'int' object has no attribute 'hash'

It seems like __eq__ in xmrtype.KeyImageIndex is being passed an int (other) instead of another KeyImageIndex. Possibly txs_by_key_index is using integer keys rather than KeyImageIndex objects.

Environment:

    Ubuntu 20.04
    Python 3.8
    xmr-haystack commit: ee1835cf11305e4f71cc4d1485e7c38d37ac581f

Let me know if you need more information or steps to reproduce the issue. I'm just reporting this for now and won’t be patching it myself.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions