Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPCClient.GetBlock (for Litecoin network) method throws when passing block number 2265984 #1125

Closed
CoinmaniaExchange opened this issue Aug 19, 2022 · 3 comments

Comments

@CoinmaniaExchange
Copy link

When calling an RPC function on a node running Litecoin Core 0.21.2 (a major update) the GetBlock method throws System.FormatException. Starting from this major update a new mweb field is returned in the response JSON object. Litecoin is no longer compatible with the Bitcoin wire protocol Blockbook uses to deserialize block data. The details of the exception are as follows:


System.FormatException HResult=0x80131537 Message=Unknown transaction optional data Source=NBitcoin StackTrace: at NBitcoin.Transaction.ReadWrite(BitcoinStream stream) at NBitcoin.BitcoinStream.ReadWrite[T](T& data) at NBitcoin.BitcoinStream.ReadWrite[T](List`1& list) at NBitcoin.Block.ReadWrite(BitcoinStream stream) at NBitcoin.BitcoinSerializableExtensions.ReadWrite(IBitcoinSerializable serializable, Stream stream, Boolean serializing, ConsensusFactory consensusFactory, Nullable`1 version) at NBitcoin.Block.Parse(String hex, ConsensusFactory consensusFactory) at NBitcoin.Block.Parse(String hex, Network network) at NBitcoin.RPC.RPCClient.<GetBlockAsync>d__106.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NBitcoin.RPC.RPCClient.GetBlock(uint256 blockId)


Are you planning to take into account the above change in the library?

@twilightrus
Copy link

+1

@NicolasDorier
Copy link
Collaborator

making new version with the fix

@NicolasDorier
Copy link
Collaborator

Pushed on 3.0.15, reopen if still an issue, didn't test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants