hfc.fabric.orderer¶
Module Contents¶
Classes¶
|
A orderer node in the network. It has a specific grpc channel address. |
-
hfc.fabric.orderer.DEFAULT_ORDERER_ENDPOINT= localhost:7050¶
-
hfc.fabric.orderer._logger¶
-
class
hfc.fabric.orderer.Orderer(name='orderer', endpoint=DEFAULT_ORDERER_ENDPOINT, tls_ca_cert_file=None, client_key_file=None, client_cert_file=None, opts=None)¶ Bases:
objectA orderer node in the network. It has a specific grpc channel address. :param object: :type object:
-
init_with_bundle(self, info)¶ Init the peer with given info dict
- Parameters
info – Dict including all info, e.g., endpoint, grpc option
- Returns
True/False
- Return type
Boolean
-
get_genesis_block(self, tx_context, channel_name)¶ get the genesis block of the channel
- Returns
the genesis block in success or None in fail
- Return type
Block/None
-
broadcast(self, envelope)¶ Send an broadcast envelope to orderer.
- Parameters
envelope – The message envelope
- Returns
orderer_response or exception
-
delivery(self, envelope, scheduler=None)¶ Send an delivery envelop to orderer.
- Parameters
envelope – The message envelope
scheduler – defaults to None
- Returns
orderer_response or exception
-
get_attrs(self)¶
-
__str__(self)¶ Return str(self).
-
property
endpoint(self)¶ Return the endpoint of the orderer.
- Returns
endpoint
-
property
name(self)¶ Return the name of the orderer.
- Returns
name of orderer
- Return type
str
-
_handle_response_stream(self, responses)¶ Handle response stream.
- Parameters
responses – responses
- Returns
response
- Return type
tuple
-
set_tls_client_cert_and_key(self, client_key_file=None, client_cert_file=None)¶ Set tls client’s cert and key for mutual tls
- Parameters
client_key_file (str) – file path for Private key used for TLS when making client connections, defaults to None
client_cert_file (str) – file path for X.509 certificate used for TLS when making client connections, defaults to None
- Returns
set success value
- Return type
Boolean
-