Closed GoogleCodeExporter closed 9 years ago
Actually, there is another thing that needs to be implemented. When sending
money to a P2SH address you need a following template:
OP_HASH160 <hash> OP_EQUAL
Original comment by maciej.t...@gmail.com
on 28 Sep 2013 at 12:58
Here is a patch for some of the simple Address handling required with P2SH.
Original comment by m...@belshe.com
on 23 Nov 2013 at 9:01
Attachments:
LGTM but I'd prefer to wait until it's finished so the code isn't in a state
where it will accept a P2SH address then do the wrong thing.
Original comment by hearn@google.com
on 25 Nov 2013 at 10:32
@hearn: What else is needed/what is not finished with the patch? I've read it
and it looks fine to me. There is even a test, so it should be trivial to find
if it does the right thing. So if it works, why don't merge it?
Original comment by maciej.t...@gmail.com
on 26 Nov 2013 at 12:48
Like I already said, if that patch was merged then code which looks correct
could accidentally destroy money: consider a GUI wallet that lets users enter
addresses. What this patch does is effectively make the Address object accept
the special P2SH version code, but doesn't teach the wallet how to use it. So
the wallet would act as if it's a normal 1AbCD address, craft a normal
pay-to-address output instead of a P2SH output, and bang.
Original comment by hearn@google.com
on 26 Nov 2013 at 9:54
@hearn - I think your comment was spot on.
Here is an updated patch. I've taught the ScriptBuilder (used by
TransactionOutput) how to generate P2SH outputs. Added a test to the wallet
which verifies outputs to p2sh addresses.
Original comment by m...@belshe.com
on 30 Nov 2013 at 9:20
Attachments:
This issue was closed by revision 98081f0568e6.
Original comment by hearn@google.com
on 30 Nov 2013 at 2:16
I did some tests with wallet tool and it worked. Thanks Mike!
Original comment by hearn@google.com
on 30 Nov 2013 at 2:16
Original issue reported on code.google.com by
maciej.t...@gmail.com
on 28 Sep 2013 at 9:44