You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when we give segwit blocks for decoding. It decodes just the header. But the inputs and outputs remain 0. Example block {0000000000000000006ccd22f57e946189f5213ce49ef3fef43df46bfd0b6c86}. https://www.blockchain.com/explorer/blocks/btc/0000000000000000006ccd22f57e946189f5213ce49ef3fef43df46bfd0b6c86. Header and transaction count is decoded but the input details and output details come as 0. Tried many files post 1000. may its issue with the witness data??
Note: bitcoin core ccli can decode to json without any issues. So the local files are not corrupt.
Code:
var wholeBlock = streamReader.ReadBytes((int)blockMemoryStreamReader.BaseStream.Length);
var rawBlockHex = BitConverter.ToString(wholeBlock).Replace("-", "").ToLower();
byte[] rawData = NBitcoin.DataEncoders.Encoders.Hex.DecodeData(rawBlockHex);
NBitcoin.Block block = NBitcoin.Block.Load(rawData, Network.Main);
The text was updated successfully, but these errors were encountered:
when we give segwit blocks for decoding. It decodes just the header. But the inputs and outputs remain 0. Example block {0000000000000000006ccd22f57e946189f5213ce49ef3fef43df46bfd0b6c86}. https://www.blockchain.com/explorer/blocks/btc/0000000000000000006ccd22f57e946189f5213ce49ef3fef43df46bfd0b6c86. Header and transaction count is decoded but the input details and output details come as 0. Tried many files post 1000. may its issue with the witness data??
Note: bitcoin core ccli can decode to json without any issues. So the local files are not corrupt.
Code:
var wholeBlock = streamReader.ReadBytes((int)blockMemoryStreamReader.BaseStream.Length);
var rawBlockHex = BitConverter.ToString(wholeBlock).Replace("-", "").ToLower();
byte[] rawData = NBitcoin.DataEncoders.Encoders.Hex.DecodeData(rawBlockHex);
NBitcoin.Block block = NBitcoin.Block.Load(rawData, Network.Main);
The text was updated successfully, but these errors were encountered: