Merged
Conversation
yacovm
reviewed
Jan 21, 2026
| close(t.ingress) | ||
| t.running.Wait() | ||
| } | ||
|
|
Collaborator
There was a problem hiding this comment.
This is just like the new code:
func (b *BasicNode) RecordMessageTypeSent(msg *simplex.Message) {
switch {
case msg.BlockMessage != nil:
b.messageTypesSent["BlockMessage"]++
case msg.VerifiedBlockMessage != nil:
b.messageTypesSent["VerifiedBlockMessage"]++
case msg.ReplicationRequest != nil:
b.messageTypesSent["ReplicationRequest"]++
case msg.ReplicationResponse != nil:
b.messageTypesSent["ReplicationResponse"]++
case msg.Notarization != nil:
b.messageTypesSent["VerifiedReplicationRequest"]++
case msg.VerifiedReplicationResponse != nil:
b.messageTypesSent["VerifiedReplicationResponse"]++
case msg.Finalization != nil:
b.messageTypesSent["NotarizationMessage"]++
case msg.FinalizeVote != nil:
b.messageTypesSent["FinalizationMessage"]++
case msg.VoteMessage != nil:
b.messageTypesSent["VoteMessage"]++
case msg.EmptyVoteMessage != nil:
b.messageTypesSent["EmptyVoteMessage"]++
case msg.EmptyNotarization != nil:
b.messageTypesSent["EmptyNotarization"]++
case msg.BlockDigestRequest != nil:
b.messageTypesSent["BlockDigestRequest"]++
default:
panic("unknown message type")
}
}
Was this file moved and then changed? or was the code just copied?
Is there a way to reduce the diff by git mv and then applying the code changes?
yacovm
reviewed
Feb 2, 2026
yacovm
reviewed
Feb 2, 2026
yacovm
reviewed
Feb 2, 2026
| @@ -0,0 +1,74 @@ | |||
| package long_running | |||
yacovm
approved these changes
Feb 2, 2026
Collaborator
yacovm
left a comment
There was a problem hiding this comment.
can be merged after adding license header
yacovm
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the
testutilpackage to better decouple testing helpers and make it easier to compose custom networks, nodes, block builders, and related components.The refactor introduces a set of building blocks, such as
BasicNodeandBasicNetworkthat encapsulate shared responsibilities like epoch message handling, lifecycle management (start/stop), and essential helper functionality. These primitives can then be composed to build more specialized testing environments, such asLongRunningNetworkorControlledInMemoryNetwork.Specialized networks and nodes are responsible for their own additional behavior (e.g., custom block builders, node crash logic, or test-specific helpers), rather than inheriting unused functionality. This avoids the need for a single, monolithic network or node type that accumulates features required only by a subset of tests, keeping the test infrastructure more modular and extensible.