-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include the NodeConfig in the consensus test output
The `getCreator` method, which tells you which node produced a block, is used in the checks of some consensus tests. The `getCreator` method takes a `NodeConfig`, but we didn't have a `NodeConfig` in those testing contexts, so we were using `error` instead. This was "fine" because this `NodeConfig` is only really used for the real PBFT implementation, which is not used in the tests, only in the demo. However, using `error` here is dirty and might work for now, but that may change in the future. Fix this by letting the test setup function return the `NodeConfig` for each node in addition to its chain. This `NodeConfig` can then be passed to `getCreator`. Actually, `getCreator` would work with any `NodeConfig` from the test setup, regardless to which node its corresponds. This is because `getCreator` only reads data from the `NodeConfig` that is common to all nodes, no node-specific data is used. Nonetheless, it is nicer to use the `NodeConfig` that belongs to "correct" node.
- Loading branch information
Showing
7 changed files
with
76 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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