[+cc Jonas Schnelli, as I discussed this topic with him last year.]
Hmmm, indeed that sounds bad. I totally overlooked this case. Seems like
BIP37 needs to be amended to include the witness in filter matching.
However, on nodes that prune the witnesses this won't work either.
P2WPKH-P2SH doesn't seem to have this problem, as it contains the
20-byte key hash in its scriptSig.
Of course as a workaround you could make sure there is always a change
back to you. Maybe to not waste coins/UTXOs create an OP_RETURN
containing one of the pubkeys?
I wonder if the new client-side filtering (BIP157) has the same problem?
> --
> You received this message because you are subscribed to the Google
> Groups "bitcoinj" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
bitcoinj+u...@googlegroups.com
> <mailto:
bitcoinj+u...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.