-
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.
Allow peer endpoints to be autodetected
The current code generally specifies a default address of the peer as 0.0.0.0:xxxx (e.g. 0.0.0.0:7051). This works as both the listener binding address and (oddly) as the client connect() address for the cases where the peer is running in certain environments (such as devenv). However, in other environments, 0.0.0.0 is not sufficient for properly connecting to an endpoint. This is a critical operation for chaincode since it will require the formation of a connection to the CORE_PEER_ADDRESS in order to function. Part of the problem is that the unit tests employ custom setup logic which does not flow through the common code for establishing the CORE_PEER_ADDRESS. Therefore, these unit-tests do not respect the ADDRESSAUTODETECT feature and are unable to present a valid endpoint in all circumstances. This will become a problem later in the series when we introduce the notion of running the unit-tests within a dockerized environment. The fix here is to mutate the unit-test setup logic to utilize the library operations that process the ADDRESSAUTODETECT feature. A few cases were not easily adaptable, so they were denoted with a FIXME label and left for a future task. Change-Id: Ib5cffb9847be6c9f4125cde9b108709e95d99e71 Signed-off-by: Greg Haskins <gregory.haskins@gmail.com>
- Loading branch information
Showing
12 changed files
with
30 additions
and
11 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
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