MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.85k stars 839 forks source link

"Unknown transaction optional data" error when calling GetBlock() #1180

Open atlos-io opened 11 months ago

atlos-io commented 11 months ago

Hello,

We are experiencing an error when calling GetBlockCount() on Litecoin Mainnet network. This is the code snippet:

var Network = Litecoin.Instance.Mainnet;
var Rpc = new RPCClient($"{RpcUser}:{RpcPassword}", RpcUrl, Network);

var blockCount = Rpc.GetBlockCount();
var block = Rpc.GetBlock(blockCount);               // this line generates the error

Error: "Unknown transaction optional data"

The code works fine with other networks, such as Bitcoin.

Has anyone seen anything like this?

lontivero commented 11 months ago

This is not a NBitcoin error but a Litecoin error message. Open and issue in Litecoin's github repo.