Closed bazooka70 closed 6 years ago
stack trace?
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
***********************************
at NBitcoin.Network.Register(NetworkBuilder builder)
at NBitcoin.NetworkBuilder.BuildAndRegister()
at NBXplorer.Altcoins.Litecoin.Networks.RegisterLazy()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at NBXplorer.Altcoins.Litecoin.Networks.<>c.<EnsureRegistered>b__3_0(Lazy`1 o)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at NBXplorer.Altcoins.Litecoin.Networks.EnsureRegistered()
at NBXplorer.NBXplorerNetworkProvider.InitLitecoin(ChainType chainType)
at NBXplorer.NBXplorerNetworkProvider..ctor(ChainType chainType)
at BCH.Program.Main(String[] args)
Yes indeed they should not be used together...
I think I should do a separate package with all altcoins instead of duplicating the code in NBXplorer.Client
.
I am closing this, I moved all altcoin related projects on https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins so you should use this now.
OK, thanks. so the problem I described is fixed now? (mixing NBXplorer.Client with other NBitcoin alt coins)
Yes, fixed once you update the packages
There seems to be a problem mixing the two together.
If I install the package
NBitcoin.Litecoin
(or other alt coin created in similar matter) andNBXplorer.Client
, and use:The line
new NBXplorerNetworkProvider(ChainType.Main).GetLTC();
throws an exception:This could be resolved by using only
NBXplorer.Client
in the project, e.g.I wonder if this is by design?