When I try it screws up the scriptPubKey - rather than:OP_HASH160 "hash value" OP_EQUAL I see this: "hash value" OP_CHECKSIG
Cannot send "coinbase" values to P2SH addresses in "regtest" #7277
issue ciyam opened this issue on January 3, 2016-
ciyam commented at 3:57 PM on January 3, 2016: none
-
sipa commented at 3:58 PM on January 3, 2016: member
Can you elaborate a bit on what you're doing exactly?
-
ciyam commented at 3:58 PM on January 3, 2016: none
sending funds to a P2SH address (that are from "coinbase") using "regtest"
-
sipa commented at 4:00 PM on January 3, 2016: member
Using RPC? What is the expected result, what is the actual result?
-
ciyam commented at 4:00 PM on January 3, 2016: none
I was only able to get things to work correctly when I first sent the funds to another testnet address
-
ciyam commented at 4:01 PM on January 3, 2016: none
literally the UTXO when I sent the funds to the P2SH was this: "public key hash" OP_CHECKSIG rather than the usual: OP_HASH160 "script hash" OP_EQUAL
-
ciyam commented at 4:01 PM on January 3, 2016: none
all I had done was to send funds to a P2SH address (i.e. starting with 2 for testnet)
-
sipa commented at 4:01 PM on January 3, 2016: member
Using sendtoaddress or a similar RPC?
-
ciyam commented at 4:02 PM on January 3, 2016: none
yes
-
ciyam commented at 4:02 PM on January 3, 2016: none
so I first did: generate 101 then I did: sendtoaddress 2XXX
-
sipa commented at 4:03 PM on January 3, 2016: member
That type of output is usually only created for coinbase outputs.
-
ciyam commented at 4:03 PM on January 3, 2016: none
so it is done on purpose? is there a reason for that?
-
ciyam commented at 4:04 PM on January 3, 2016: none
(the output was not supposed to be coinbase as it was supposed to be spending coinbase) (but maybe I have got confused)
-
sipa commented at 4:04 PM on January 3, 2016: member
How do you notice the produced transaction is wrong?
Can you paste the output of
decoderawtransaction txidwhere txid is the txid reported by sendtoaddress? -
ciyam commented at 4:06 PM on January 3, 2016: none
I didn't keep it but for sure it looks like this: "public key hash" OP_CHECKSIG rather than this: OP_HASH160 "script hash" OP_EQUAL
-
ciyam commented at 4:06 PM on January 3, 2016: none
just try and send any coinbase to a P2SH using regtest (am sure you'll get the same result using 0.11.2)
-
sipa commented at 4:10 PM on January 3, 2016: member
Are you sure you were looking at the right transaction?
-
ciyam commented at 4:10 PM on January 3, 2016: none
yes - I repeated this many times today (wasted many hours)
-
ciyam commented at 4:11 PM on January 3, 2016: none
you cannot send to a P2SH address using "regtest" from "coinbase"
-
sipa commented at 4:11 PM on January 3, 2016: member
Can you then please paste the output of getrawtransaction on it?
-
ciyam commented at 4:20 PM on January 3, 2016: none
Hmm.. this is very weird. All day I was having this problem but now when I try and repeat it no such problem. :(
-
ciyam commented at 4:22 PM on January 3, 2016: none
I'm pretty sure there is an issue but of course if I can't repeat it then I understand it can't be looked into.
-
ciyam commented at 4:24 PM on January 3, 2016: none
(now I am very confused as to why this caused me problems today)
-
sipa commented at 4:25 PM on January 3, 2016: member
Feel free to reopen when you can reproduce.
- sipa closed this on Jan 3, 2016
- DrahtBot locked this on Sep 8, 2021