What new JSON-RPC calls are available with SegWit activation?

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?

pinhead

Posted 2016-11-17T21:04:10.437

Reputation: 2 356

Answers

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.

m1xolyd1an

Posted 2016-11-17T21:04:10.437

Reputation: 3 356