Bitcoin full node and query server

Oct 16, 2018

View in context in the libbitcoin Slack #general mirror.

M
Mlmikael13:23
The P2WSH pubkey script, the hash it contains, is it a single- or dual-iteration SHA256 of the witness program (which is stored in the spending input's witness data)? Could you give me some reference to where LibBitcoin validates or generates such a hash in the pubkey script?
James C.16:45
Hi Mikael! I think witness script validation is here: https://github.com/libbitcoin/libbitcoin/blob/master/src/chain/witness.cpp#L454 The witness verify method is here: https://github.com/libbitcoin/libbitcoin/blob/master/src/chain/witness.cpp#L478 And the overall script evaluate method is here: https://github.com/libbitcoin/libbitcoin/blob/master/src/chain/script.cpp#L1381 Is that what you are looking for?
(edited)