Jeff Garzik [ARCHIVE] on Nostr: 📅 Original date posted:2014-05-04 📝 Original message:On Sat, May 3, 2014 at ...
📅 Original date posted:2014-05-04
📝 Original message:On Sat, May 3, 2014 at 3:15 PM, Mark Friedenbach <mark at monetize.io> wrote:
> Is it more complex? The current implementation using template matching
> seems more complex than `if script.vch[0] == OP_RETURN &&
> script.vch.size() < 42`
Not much more complex.
The template matches a two-chunk script with OP_RETURN + one pushdata
(or just OP_RETURN with no push). The pushdata is further limited to
MAX_OP_RETURN_RELAY bytes.
--
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc. https://bitpay.com/
📝 Original message:On Sat, May 3, 2014 at 3:15 PM, Mark Friedenbach <mark at monetize.io> wrote:
> Is it more complex? The current implementation using template matching
> seems more complex than `if script.vch[0] == OP_RETURN &&
> script.vch.size() < 42`
Not much more complex.
The template matches a two-chunk script with OP_RETURN + one pushdata
(or just OP_RETURN with no push). The pushdata is further limited to
MAX_OP_RETURN_RELAY bytes.
--
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc. https://bitpay.com/