Beispiel #1
0
 public OnlineNode(ProtocolSettings settings, ExpressChain chain, ExpressConsensusNode node)
 {
     this.ProtocolSettings = settings;
     this.chain            = chain;
     rpcClient             = new RpcClient(new Uri($"http://localhost:{node.RpcPort}"), protocolSettings: settings);
     consensusNodesKeys    = new Lazy <KeyPair[]>(() => chain.GetConsensusNodeKeys());
 }
Beispiel #2
0
        public OfflineNode(ProtocolSettings settings, RocksDbStorageProvider rocksDbStorageProvider, Wallet nodeWallet, ExpressChain chain, bool enableTrace)
        {
            this.nodeWallet             = nodeWallet;
            this.chain                  = chain;
            this.rocksDbStorageProvider = rocksDbStorageProvider;
            applicationEngineProvider   = enableTrace ? new ApplicationEngineProvider() : null;
            consensusNodesKeys          = new Lazy <KeyPair[]>(() => chain.GetConsensusNodeKeys());

            var storageProviderPlugin = new StorageProviderPlugin(rocksDbStorageProvider);

            _         = new PersistencePlugin(rocksDbStorageProvider);
            neoSystem = new NeoSystem(settings, storageProviderPlugin.Name);

            ApplicationEngine.Log += OnLog !;
        }