Can payment from a P2SH address provide change to itself?

0

In the gavinandresen Multisig Test test, could change have been redirected to the originating 3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC P2SH address for the multisig payments?

In Mastering Bitcoin by Andreas M. Antonopoulos, Chapter 5. Transactions the following statement is made, and I would like to know if it invalidate my question above: "Note that you are not able to put a P2SH inside a P2SH redeem script, because the P2SH specification is not recursive."

Hansie Odendaal

Posted 2019-05-06T15:43:39.067

Reputation: 1

Answers

2

These two things are actually not related. There are no restrictions to address reuse in the protocol. You could get away with never using more than a single address ever (although that is not recommended especially for privacy reasons) and p2sh addresses are no exception there.

The redeem script encodes the conditions that have to be fulfilled in order to spend funds from an unspent transaction output (UTXO). What the sentence says, is that you cannot have a lock to another redeem script inside of a redeem script.

Murch

Posted 2019-05-06T15:43:39.067

Reputation: 41 609