3

For example, I can see getblock now returns two fields for a block's size:

size (all data) and strippedsize (base block size, NOT including witness data)

Are there any more RPC updates to interact with witness data? Like return the number of segwit transactions in a block? Or return the wtxid or witness data from a specific transaction?

1

As you mentioned, strippedsize was added as a parameter to getblock() that shows the block size excluding witness data.

txinwitness has been added as value to the response from getrawtransaction() and decoderawtransaction().

That's all I was able to pick up from the RPC... I suspect looping through the transactions in each block and checking for the txinwitness value could get the number of segwit transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.