module
neo3.network.convenience.syncmanager
P2P network sync manager.
Classes
SyncManager— Convenience class for syncing the chain over the P2P network.Takes care of requesting blocks, tracking the request, resending if necessary and forwarding the received blocks to a consumer.
class
neo3.network.convenience.syncmanager.SyncManager(*args, **kwds)
Bases
neo3.singleton._Singleton
Convenience class for syncing the chain over the P2P network.Takes care of requesting blocks, tracking the request, resending if necessary and forwarding the received blocks to a consumer.
method
shutdown()
Gracefully shutdown the sync manager.
Stops block persisting and all service tasks.
Note
This dependents on asyncio's Task canceling logic. It waits for all tasks to be cancelled and/or stopped before returning.
method
start(timeout=5)
Start the block syncing service. Requires a started node manager.
Parameters
timeout(optional) — time in seconds to wait for finding a started node manager.
Raises
Exception— if no started Nodemanager is found withintimeoutseconds.