AddressBook

Address book for node p2p communication

Members

Functions

exists
bool exists(Pubkey pkey)

Check for a public key in network @param pkey - public key of check @return true if public key exist

isActive
bool isActive(Pubkey pkey)

Check for an active public key in network @param pkey - public key of check @return true if pkey active

keys
Pubkey[] keys()

Return active node channels in network @return active node channels

length
size_t length()

Return amount of nodes in networt @return amount of nodes

opAssign
void opAssign(immutable(NetworkNodeRecord)*[] nnrs)

* Sets the Addresses from an array of NNR records * The addresses should be empty when set

opIndex
NNRResult opIndex(Pubkey pkey)

Init NodeAddress if public key exist @param pkey - public key for check @return initialized node address

remove
void remove(Pubkey pkey)

Remove addresses by public key @param pkey - public key of remove addresses

Variables

addresses
immutable(NetworkNodeRecord)*[Pubkey] addresses;

Addresses for node