nblockchain / geewallet

geewallet is a non-custodial, minimalistic & pragmatist opensource crossplatform lightweight brainwallet to hold the most important cryptoassets in the same application with ease & peace of mind
MIT License
61 stars 37 forks source link

ResultInconsistencyException should include Currency instance #246

Closed knocte closed 8 months ago

knocte commented 8 months ago

Steps to reproduce:

  1. Receive ResultInconsistencyException crash.

Current results: No idea of which currency failed:

GWallet.Backend.ResultInconsistencyException: Results obtained were not enough to be considered consistent (received: 1, consistent: 1, required: 2)
   at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.clo@571-48.Invoke(FinalResult`3 _arg3) in /Users/knocte/Documents/Code/geewalletSTABLE/src/GWallet.Backend/FaultTolerantParallelClient.fs:line 612
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, b result1, FSharpFunc`2 userCode) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 528
   at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.jobWithCancellation@508-3.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.clo@304-23.Invoke(AsyncActivation`1 ctxt)
   at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.WhenAny@120-2.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 454
   at Microsoft.FSharp.Control.AsyncPrimitives.QueueAsyncAndWaitForResultSynchronously[a](CancellationToken token, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1140
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1167
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 1511
   at Program.ProgramMainLoop[a]() in /Users/knocte/Documents/Code/geewalletSTABLE/src/GWallet.Frontend.Console/Program.fs:line 473
   at Program.NormalStartWithNoParameters() in /Users/knocte/Documents/Code/geewalletSTABLE/src/GWallet.Frontend.Console/Program.fs:line 490

Expected results: Should throw a new exception type (for example called InconsistentResultFromDifferentServersOfSameCurrency) that has the currency instance as a property and the ResultInconsistencyException instance as innerException, and should be included in error message too.