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
process blocks #5681
process blocks #5681
Conversation
# Conflicts: # node/chainSimulator/chainSimulator.go # node/chainSimulator/components/testOnlyProcessingNode.go # node/chainSimulator/interface.go
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feat/test-only-processor-node #5681 +/- ##
==============================================================
Coverage 79.26% 79.26%
==============================================================
Files 724 724
Lines 95190 95210 +20
==============================================================
+ Hits 75452 75471 +19
+ Misses 14386 14385 -1
- Partials 5352 5354 +2
☔ View full report in Codecov by Sentry. |
@@ -151,11 +151,6 @@ func NewTestOnlyProcessingNode(args ArgsTestOnlyProcessingNode) (*testOnlyProces | |||
if err != nil { | |||
return nil, err | |||
} | |||
err = instance.createTransactionLogProcessor() |
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.
We need the tx logs processor. Please put back the code
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.
the logs processor is created inside the process components.
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.
ok
blsKeyBytes []byte | ||
} | ||
|
||
func NewBlocksCreator(nodeHandler NodeHandler, blsKeyBytes []byte) (*blocksCreator, error) { |
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.
missing comment
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.
added
currentHeader := creator.nodeHandler.GetChainHandler().GetCurrentBlockHeader() | ||
var nonce, round uint64 | ||
var prevHash, prevRandSeed []byte | ||
if currentHeader != nil { |
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.
please extract in a function L23 - L34
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.
done
return err | ||
} | ||
|
||
err = newHeader.SetChainID([]byte("chain")) |
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.
"chain" should be a const and used also in node/chainSimulator/configs/configs.go L51
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.
done
nonce, round = currentHeader.GetNonce(), currentHeader.GetRound() | ||
prevHash = creator.nodeHandler.GetChainHandler().GetCurrentBlockHeaderHash() | ||
prevRandSeed = currentHeader.GetRandSeed() | ||
} else { |
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.
could have omitted the "else" branch and return on L101
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.
changed
}, nil | ||
} | ||
|
||
// CreateNewBlock create and process a new block |
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.
// CreateNewBlock create and process a new block | |
// CreateNewBlock creates and process a new block |
?
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.
fixing in the next PR
Reasoning behind the pull request
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?