Closed aarani closed 1 year ago
I tested this today with BTC and I got this crash:
System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.Server.ElectrumServerToRetrievalFunc@70-3.Invoke(Exception _arg1)
at GWallet.Backend.UtxoCoin.Server.ElectrumServerToRetrievalFunc@70-6.Invoke(Exception exn)
at GWallet.Backend.UtxoCoin.Server.ElectrumServerToRetrievalFunc@70-8.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
System.AggregateException: One or more errors occurred. ---> System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.ReportWarning(Exception ex)
at GWallet.Backend.UtxoCoin.Server.FaultTolerantParallelClientDefaultSettings@35.Invoke(Exception ex)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-8.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-15.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-17.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.clo@312-26.Invoke(ServerTask`2 _arg1)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.WhenAny@118-7.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.FSharp.Control.AsyncResult`1.Commit()
at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a](CancellationToken cancellationToken, FSharpAsync`1 computation)
at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout)
at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken)
at Program.sendPayment@13.Invoke(Boolean ignoreHigherMinerFeeThanAmount)
at Program.TrySendAmount(NormalAccount account, IBlockchainFeeInfo transactionMetadata, String destination, TransferAmount amount)
at Program.TrySendAmount(NormalAccount account, IBlockchainFeeInfo transactionMetadata, String destination, TransferAmount amount)
at Program.TrySendAmount(NormalAccount account, IBlockchainFeeInfo transactionMetadata, String destination, TransferAmount amount)
at Program.SendPaymentOfSpecificAmount(IAccount account, TransferAmount amount, IBlockchainFeeInfo transactionMetadata, String destination)
at Program.SendPayment()
at Program.PerformOperation(UInt32 numActiveAccounts, UInt32 numHotAccounts)
at Program.ProgramMainLoop[a]()
at Program.NormalStartWithNoParameters()
---> (Inner Exception #0) System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.ReportWarning(Exception ex)
at GWallet.Backend.UtxoCoin.Server.FaultTolerantParallelClientDefaultSettings@35.Invoke(Exception ex)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-8.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-15.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-17.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)<---
System.AggregateException: One or more errors occurred. ---> System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.ReportWarning(Exception ex)
at GWallet.Backend.UtxoCoin.Server.FaultTolerantParallelClientDefaultSettings@35.Invoke(Exception ex)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-8.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-15.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-17.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.LogOrReportCrash(Exception ex)
at Program.NormalStartWithNoParameters()
at Program.main(String[] argv)
---> (Inner Exception #0) System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.ReportWarning(Exception ex)
at GWallet.Backend.UtxoCoin.Server.FaultTolerantParallelClientDefaultSettings@35.Invoke(Exception ex)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-8.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-15.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-17.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)<---
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.Exception: Some problem when connecting to electrum.blockstream.info ---> System.Exception: Failed deserializing JSON response (to check for error) '{"error":"bad tx_hash","id":0,"jsonrpc":"2.0"}' to type 'GWallet.Backend.UtxoCoin.BlockchainTransactionGetResult' ---> Newtonsoft.Json.JsonSerializationException: Error converting value "bad tx_hash" to type 'GWallet.Backend.UtxoCoin.ErrorInnerResult'. Path 'error', line 1, position 22. ---> System.ArgumentException: Could not cast or convert from System.String to GWallet.Backend.UtxoCoin.ErrorInnerResult.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType)
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
--- End of inner exception stack trace ---
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(JsonReader reader, Object value, CultureInfo culture, JsonContract contract, Type targetType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues(JsonObjectContract contract, JsonProperty containerProperty, JsonReader reader, Type objectType)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
--- End of inner exception stack trace ---
at GWallet.Backend.UtxoCoin.StratumClient.DeserializeInternal[T](String result)
at GWallet.Backend.UtxoCoin.StratumClient.Deserialize[T](String result)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@130-18.Invoke(Unit unitVar)
at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-39.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.AsyncPrimitives.unitAsync@589.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@125-42.Invoke(AsyncActivation`1 ctxt)
at <StartupCode$GWallet-Backend>.$JsonRpcTcpClient.Request@90-3.Invoke(AsyncActivation`1 ctxt)
at GWallet.Backend.FSharpUtil.WithTimeout@187-2.Invoke(AsyncActivation`1 ctxt)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-20.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-38.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$StratumClient.Request@129-40.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.ReportWarning(Exception ex)
at GWallet.Backend.UtxoCoin.Server.FaultTolerantParallelClientDefaultSettings@35.Invoke(Exception ex)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-8.Invoke(Exception _arg2)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-15.Invoke(Exception exn)
at <StartupCode$GWallet-Backend>.$FaultTolerantParallelClient.Run@136-17.Invoke(Exception edi)
at Microsoft.FSharp.Control.AsyncPrimitives.CallFilterThenInvoke[T](AsyncActivation`1 ctxt, FSharpFunc`2 catchFilter, ExceptionDispatchInfo edi)
at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of inner exception stack trace ---
at GWallet.Backend.Infrastructure.Report(Exception ex, ErrorLevel _arg1)
at GWallet.Backend.Infrastructure.LogOrReportCrash(Exception ex)
at GWallet.Backend.Infrastructure.OnUnhandledException(Object _arg1, UnhandledExceptionEventArgs args)
at GWallet.Backend.Infrastructure.SetupExceptionHook@179-4.Invoke(Object delegateArg0, UnhandledExceptionEventArgs delegateArg1)
@aarani what is that last 'fiup' commit? it doesn't make much sense from my point of view, I guess I'm missing something
@aarani what is that last 'fiup' commit? it doesn't make much sense from my point of view, I guess I'm missing something
PS: please don't push anything to this PR until you have answered the above and I have replied/acked.
@aarani what is that last 'fiup' commit? it doesn't make much sense from my point of view, I guess I'm missing something
The commit's purpose is to fix sanity check step. The Backend.Tests was referencing an old version of Logging package.
Question: does the prompt "are you absolutely sure..." happen before or after asking the user for the password to unlock the account?
Question: does the prompt "are you absolutely sure..." happen before or after asking the user for the password to unlock the account?
After.
After
Ok, let's change it to before, please. Otherwise I cannot test properly without losing a bunch of time and fees (and anyway , doing it before is better UX).
This prevents any future bug to cause unreasonable fees.