-
Notifications
You must be signed in to change notification settings - Fork 476
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
Always trace invalid block even if succeeds on trace #8131
base: master
Are you sure you want to change the base?
Conversation
string condition; | ||
string blockHash; | ||
if (blocksOrHash is Hash256 failedBlockHash) | ||
{ | ||
condition = "invalid"; | ||
blockHash = failedBlockHash.ToString(); | ||
} | ||
else | ||
{ | ||
List<Block> blocks = blocksOrHash as List<Block>; | ||
condition = "valid on rerun"; | ||
|
||
if (blocks.Count == 1) | ||
{ | ||
blockHash = blocks[0].Hash.ToString(); | ||
} | ||
else | ||
{ | ||
blockHash = string.Join("|", blocks.Select(b => b.Hash.ToString())); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe put that in separate method
After more thought, I am not sure if this is useful? |
It does specify if valid or invalid logs; and some logs is better than none (so at least can see what type of thing is in the block) |
should we add valid/invalid info to file name? |
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing