private BlockFetcher Enumerate(string checkpoint, ChainBase blockHeaders) { blockHeaders = blockHeaders ?? GetNodeChain(); var node = Configuration.ConnectToNode(false); node.VersionHandshake(); return(new BlockFetcher(new Checkpoint(Configuration.GetFilePath(checkpoint), Configuration.Network), node, blockHeaders) { CheckpointInterval = CheckpointInterval, DisableSaving = NoSave, FromHeight = FromHeight, ToHeight = ToHeight }); }
public long IndexTransactions(ChainBase chain = null) { using (IndexerTrace.NewCorrelation("Import transactions to azure started")) { using (var node = Configuration.ConnectToNode(false)) { node.VersionHandshake(); var task = new IndexTransactionsTask(Configuration); task.SaveProgression = !IgnoreCheckpoints; task.Index(GetBlockFetcher(GetCheckpointInternal(IndexerCheckpoints.Transactions), node, chain), TaskScheduler); return(task.IndexedEntities); } } }