Bitcoin Forum
October 19, 2024, 02:30:13 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: scriptPubKey not verified upon locking, but when trying to unlock it  (Read 390 times)
pgmforever (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 12


View Profile
November 02, 2018, 05:20:00 PM
 #21

Looks good? having issues with it :-s

It would be better if you provide your testnet private keys, code, raw transactions, etc

yeah, that sounds better indeed. will post tomorrow the hexes together with private keys and some code ive used to generate txes
pgmforever (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 12


View Profile
November 05, 2018, 04:22:59 PM
 #22

So there was no need to post everything after all because I was able to track down the issue.

If anyone else hits this problem, the thing is that when spending p2sh-locked utxo, one needs to put into the input's scriptPubKey (when signing) the full redeem script, not the 23 bytes long (a9 + 14 + hash + 87) scriptPubKey that was used to lock that output in the first place (like it's the case with normal p2pkh transactions).

Anyways thanks a lot for all the help Grin
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!