Does my segwit node only have segwit blocks?

2

My segwit node makes a gettxout RPC query and checks the scriptPubKey.type is "witness_v0_keyhash" and does things accordingly.

To my understanding old nodes have different blocks and if I happened to fetch a block from an old node, what will my node do? Will it simply store it as is and ultimately result in not getting the desired "witness_v0_keyhash" response when I expect?

nopara73

Posted 2018-10-21T07:50:12.133

Reputation: 592

Answers

2

BIP 144 equipped nodes doesn't fetch blocks from old nodes since they are only capable of providing witness stripped blocks.

If someone sent it a stripped block (e.g. by lying about their support or whatnot) and it contained any segwit using transactions then it would get dropped and the peer disconnected-- basically treated like merkle tree malleability.

G. Maxwell

Posted 2018-10-21T07:50:12.133

Reputation: 6 039