internal void SkipToEnd()
        {
            var height = Math.Min(ToHeight, _BlockHeaders.Tip.Height);

            _LastProcessed = _BlockHeaders.GetBlock(height);
            IndexerTrace.Information("Skipped to the end at height " + height);
        }
Exemple #2
0
        public ChainBase GetNodeChain(Node node)
        {
            var chain = new ConcurrentChain(Configuration.Network);

            IndexerTrace.Information("Synchronizing with local node");
            node.SynchronizeChain(chain);
            IndexerTrace.Information("Chain loaded with height " + chain.Height);
            return(chain);
        }
Exemple #3
0
 public void DeleteCheckpoints()
 {
     foreach (var checkpoint in _Checkpoints)
     {
         var file = Configuration.GetFilePath(checkpoint);
         File.Delete(file);
         IndexerTrace.Information(file + " Deleted");
     }
 }
Exemple #4
0
 public ChainBase GetNodeChain()
 {
     IndexerTrace.Information("Connecting to node " + Configuration.Node);
     using (var node = Configuration.ConnectToNode(false))
     {
         IndexerTrace.Information("Handshaking");
         node.VersionHandshake();
         return(GetNodeChain(node));
     }
 }
Exemple #5
0
 public ChainBase GetNodeChain()
 {
     IndexerTrace.Information("Connecting to node " + Configuration.Node);
     using (var node = Configuration.ConnectToNode(false))
     {
         IndexerTrace.Information("Handshaking");
         node.VersionHandshake();
         var chain = new ConcurrentChain(Configuration.Network);
         IndexerTrace.Information("Synchronizing with local node");
         node.SynchronizeChain(chain);
         IndexerTrace.Information("Chain loaded with height " + chain.Height);
         return(chain);
     }
 }