示例#1
0
 public NodeSynchronizer(
     RPCNodeCaller rPCNodeCaller,
     IOptions <NetSettings> netsettings,
     IOptions <DbSettings> dbSettings)
 {
     this.db            = StateOfNeoContext.Create(dbSettings.Value.DefaultConnection);
     this.rPCNodeCaller = rPCNodeCaller;
     this.netsettings   = netsettings;
 }
 public NodeSynchronizer(NodeCache nodeCache,
                         StateOfNeoContext ctx,
                         RPCNodeCaller rPCNodeCaller,
                         LocationCaller locationCaller,
                         IOptions <NetSettings> netsettings)
 {
     _nodeCache      = nodeCache;
     _ctx            = ctx;
     _rPCNodeCaller  = rPCNodeCaller;
     _locationCaller = locationCaller;
     _netsettings    = netsettings;
     UpdateDbCache();
 }
示例#3
0
 public NotificationEngine(IHubContext <NodeHub> nodeHub,
                           IHubContext <BlockHub> blockHub,
                           IHubContext <TransactionCountHub> transCountHub,
                           IHubContext <TransactionAverageCountHub> transAvgCountHub,
                           NodeCache nodeCache,
                           NodeSynchronizer nodeSynchronizer,
                           RPCNodeCaller rPCNodeCaller,
                           StateOfNeoContext ctx,
                           IOptions <NetSettings> netSettings)
 {
     _ctx              = ctx;
     _nodeHub          = nodeHub;
     _nodeCache        = nodeCache;
     _transCountHub    = transCountHub;
     _transAvgCountHub = transAvgCountHub;
     _nodeSynchronizer = nodeSynchronizer;
     _rPCNodeCaller    = rPCNodeCaller;
     _netSettings      = netSettings.Value;
     this.blockHub     = blockHub;
 }