Ninjastic
Home
Search
Users
Boards
Addresses
Ctrl + K
Toggle theme
Open menu
Post
Edited versions
Quotes to this post
Post
40032777
Topic
4459540
Re: I can not parse files after blk00975.dat (Bitcoin Core)
by
jaruvido
on
13/06/2018, 13:56:37 UTC
Quote from: giftseller8x on June 13, 2018, 01:27:53 PM
I fall into this issue before but still cannot solve it.
I change the way to parse block data.
I got this explanation from
https://github.com/bitcoin/bitcoin/blob/master/src/primitives/transaction.h
/ **
* Basic transaction serialization format:
* - int32_t nVersion
* - std :: vector vin
* - std :: vector vout
* - uint32_t nLockTime
*
* Extended transaction serialization format:
* - int32_t nVersion
* - unsigned char dummy = 0x00
* - unsigned char flags (! = 0)
* - std :: vector vin
* - std :: vector vout
* - if (flags & 1):
* - CTxWitness wit;
* - uint32_t nLockTime
* /
and from here
https://bitcoin.stackexchange.com/questions/55232/parsing-a-segwit-transaction-what-is-the-size-of-witness-data/55234
for each input {
stackItems = read integer
if stackItems> 0 {
for each stackItem {
bytes = read integer
// witness data is bytes long
}
}
}