MetacoSA / NBitcoin.Indexer

Scalable and fault-tolerant block chain indexer for Azure cloud platform.
MIT License
28 stars 21 forks source link

Indexer fails when syncing with btctest network #6

Open aph5nt opened 8 years ago

aph5nt commented 8 years ago

indexer vs testnet

conditions:

NicolasDorier commented 8 years ago

I can't fix it right now as my computer is blue screening me. First time I see it, and using NBitcoin Indexer everyday, it may not happen with restarting it. Can you try? I'll fix it as soon as I manage to get my computer on its feet.

aph5nt commented 8 years ago

I'm working on a fix for that.

aph5nt commented 8 years ago

It fails on IndexerTrace.Processed method when we try to calculate remaining time

var estimatedTime = downloadedSize == 0.0m ? TimeSpan.FromDays(999.0) : TimeSpan.FromTicks((long)((remainingSize / downloadedSize) * time.Ticks));

aph5nt commented 8 years ago

btw, Im not sure why the Peek method is being used, as it will always return the first element from the queue eg. var lastHeight = lastHeights.Peek(); In my case I always get 0

NicolasDorier commented 8 years ago

It returns the next Element that will be unqueued. (Which should be the last element)

NicolasDorier commented 7 years ago

fixed on 9c7ed18441f1bc21af087b83c0567674392028db