Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix blockfound parser #293

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/chia_log/parsers/block_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BlockParser:
def __init__(self):
logging.info("Enabled parser for block found stats.")
self._regex = re.compile(
r"([0-9:.]*) full_node (?:src|chia).full_node.full_node\s*: INFO\s* ((?:🍀|.)\s* Farmed unfinished_block)"
r"([0-9:.]*) full_node (?:src|chia).full_node.full_node\s*: INFO\s* ((?:🍀|.)\s*Farmed unfinished_block)"
Copy link
Owner

@martomi martomi Sep 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this. What's this character after the 🍀? Looks like empty space but it's not. Otherwise \s* will cover it.

It'd be good if anyone else can confirm if they have that in their output before we merge this. Also adding an example log and test-case for that parser will prevent similar issues in future. Similar to already existing log tests

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

)

def parse(self, logs: str) -> List[BlockMessage]:
Expand Down