Skip to content

Commit

Permalink
Add sort order and unrestricted flag
Browse files Browse the repository at this point in the history
  • Loading branch information
RecRanger committed May 30, 2024
1 parent 7d5346e commit 73f983a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "used_addr_check"
version = "0.1.3"
version = "0.1.4"
authors = [
{ name="RecRanger", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/used_addr_check/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__VERSION__ = "0.1.3"
__VERSION__ = "0.1.4"
__AUTHOR__ = "RecRanger"

from .index_create import ( # noqa F401
Expand Down
2 changes: 1 addition & 1 deletion src/used_addr_check/index_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ def search_multiple_in_file(
logger.info(
f"Found {len(found_needles):,}/{len(needles):,} needles in the file"
)
logger.info(f"Needles found: {found_needles}")
logger.info(f"Needles found: {sorted(found_needles)}")
return found_needles
13 changes: 11 additions & 2 deletions src/used_addr_check/scan_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ def _extract_addresses_from_file_ripgrep(text_file_path: Path) -> List[str]:
regex_pattern=BITCOIN_ADDR_REGEX,
path=str(text_file_path.absolute()),
)
results = rg.only_matching().json().run().as_dict
results = (
rg.only_matching()
.json()
.unrestricted()
.unrestricted()
.unrestricted()
.run()
.as_dict
)

matches = []
for result in results:
Expand Down Expand Up @@ -126,7 +134,8 @@ def scan_file_for_used_addresses(

needle_addresses = extract_addresses_from_file(needle_file_path)
logger.info(
f"Extracted {len(needle_addresses):,} addresses from the needle file"
f"Extracted {len(needle_addresses):,} addresses from the needle file "
f" ({needle_file_path})"
)

# remove duplicates (get distinct addresses)
Expand Down

0 comments on commit 73f983a

Please sign in to comment.