Copyright (c) 2017 beyond-blockchain.org.
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
TopologyManagerBase(network=None, config=None, domain_id=None, node_id=None, loglevel='all', logname=None)¶
Network topology management for a domain
This class defines how to create topology, meaning that who should be neighbors and provides very simple topology management, that is full mesh topology. If P2P routing algorithm is needed, you should override this class to upgrade functions. This class does not manage the neighbor list itself (It’s in BBcNetwork)
make nodelist binary for advertising
Update expiration timer for the notified node_id
- node_id (bytes) – target node_id
- is_new (bool) – If True, this node is a new comer node
Process received message
Parameters: msg (dict) – received message
Invalidate all running timers
Update expiration timer