Function NetworkClient.setIdentity

Set/get the node's identity

void setIdentity (
  in ref const(geod24.bitblob.BitBlob!(64L)) utxo,
  in ref const(PublicKey) key
);

The identity of a node can be accessed through the identity property. The logger is also changed to make it easier to identify peers and selectively enable or disable logging.

Identity has two components: public key and UTXO. Because nodes are configured with their public key, a node can have a public key but no UTXO (no stake yet), and later gain one. To account for this case, setIdentity can be called twice: Once with just a public key and the UTXO being Hash.init, and a second time with the same PublicKey but a non-init UTXO.

Parameters

NameDescription
utxo UTXO used as collateral by this peer
key Public key of this peer