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

Always trace invalid block even if succeeds on trace #8131

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

benaadams
Copy link
Member

Changes

  • If an invalid block succeeds when tracing it (is valid) still output the traces

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)

Testing

Requires testing

  • No

Comment on lines +55 to +75
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()));
}
}
Copy link
Member

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

@LukaszRozmej
Copy link
Member

After more thought, I am not sure if this is useful?

@benaadams
Copy link
Member Author

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)

@LukaszRozmej
Copy link
Member

should we add valid/invalid info to file name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants