-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I tried deserializing the block headers using the provided tests, but there was one byte left per header.
https://github.com/dartcoin/dart-bitcoin/blob/master/lib/src/core/block_header.dart#L105
I'm not sure if the byte left is a 00 byte dividing the headers? Or is is the txs count?
I modified it like this:
void bitcoinDeserialize(bytes.Reader reader, int pver) {
version = readUintLE(reader);
previousBlock = readSHA256(reader);
merkleRoot = readSHA256(reader);
timestamp = readUintLE(reader);
difficultyTarget = readUintLE(reader);
nonce = readUintLE(reader);
reader.readByte(); // 00 byte
}
Is this right, or is there a better place/way to do it?
Metadata
Metadata
Assignees
Labels
No labels