'Nethereum C# BlockProcessor how to set MinConfirmations
I'm trying to process the most recent Blocks with a BlockProcessor in Nethereum. I think by default it is waiting for 12 block confirmations before processing them. How can I set the minConfirmations to 0?
var processor = web3.Processing.Blocks.CreateBlockProcessor(steps =>
{
steps.TransactionStep.SetMatchCriteria(t =>
addresses.Contains(t.Transaction.From));
steps.TransactionReceiptStep.AddProcessorHandler(tx => HandleTx(tx));
//steps.FilterLogStep.AddProcessorHandler(l => filterLogs.Add(l));
});
//if we need to stop the processor mid execution - call cancel on the token
var cancellationToken = new CancellationToken();
//crawl the blocks
await processor.ExecuteAsync(
toBlockNumber: new BigInteger(0),
cancellationToken: cancellationToken,
startAtBlockNumberIfNotProcessed: new BigInteger(14774327));
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
