-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-7544] Refactor orderer benchmark init
The performance package is used in production code, but its init function did setup for objects and variables that are only used in the orderer's benchmark mode. That means that when the performance package is imported, some unneccessary initializations were being done. This fix for [FAB-7544] moves those initializations out of the init function, so they will only happen when they are needed. No unit tests have been added because all of these lines of code are already tested by the orderer's benchmark test. Some refactoring of the benchmarkOrderer was also needed. The initializations were moved to the beginning of the function. This was needed because MakeNormalTx was failing as it was unable to get an MSP-based signer. It was working before because the the init function in the performance package had already loaded a local MSP, so when benchmarkOrderer was doing it again later, it was actually doing nothing. Change-Id: I9b222e4d5468f8b6dbb676007e357e2a457b6ac6 Signed-off-by: Ben Weintraub <benweintraub34@gmail.com>
- Loading branch information
Showing
3 changed files
with
17 additions
and
28 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