Bitcoin Forum
November 14, 2019, 04:01:53 AM *
News: 10th anniversary art contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Raw transaction : which version for P2SH  (Read 74 times)
darosior
Full Member
***
Offline Offline

Activity: 196
Merit: 223



View Profile WWW
December 13, 2018, 01:27:14 PM
Merited by ETFbitcoin (1), DarkStar_ (1)
 #1

Hi,

I'm creating raw (non-segwit) transactions and am wondering if I should specify a version >1 for a tx paying to a script hash to be valid.

1573704113
Hero Member
*
Offline Offline

Posts: 1573704113

View Profile Personal Message (Offline)

Ignore
1573704113
Reply with quote  #2

1573704113
Report to moderator
1573704113
Hero Member
*
Offline Offline

Posts: 1573704113

View Profile Personal Message (Offline)

Ignore
1573704113
Reply with quote  #2

1573704113
Report to moderator
1573704113
Hero Member
*
Offline Offline

Posts: 1573704113

View Profile Personal Message (Offline)

Ignore
1573704113
Reply with quote  #2

1573704113
Report to moderator
The Bitcoin Forum is turning 10 years old! Join the community in sharing and exploring the notable posts made over the years.
1573704113
Hero Member
*
Offline Offline

Posts: 1573704113

View Profile Personal Message (Offline)

Ignore
1573704113
Reply with quote  #2

1573704113
Report to moderator
Coding Enthusiast
Hero Member
*****
Offline Offline

Activity: 701
Merit: 1157


Novice C♯ Coder


View Profile WWW
December 13, 2018, 04:54:34 PM
Merited by DarkStar_ (2), ETFbitcoin (1), darosior (1)
 #2

Both versions 1 and 2 would be valid in your case. And whenever you are in doubt, just use the highest version which is currently 2!

Projects List+Suggestion box
Donation link using BIP21
Bech32 Donation link!
BitcoinTransactionTool (0.9.2):  Ann - Source Code
Watch Only Bitcoin Wallet (supporting SegWit) (3.1.0):  Ann - Source Code
SharpPusher (broadcast transactions) (0.10.0): Ann - Source Code

aliashraf
Hero Member
*****
Offline Offline

Activity: 952
Merit: 706

always remember, remember the cause


View Profile WWW
December 13, 2018, 06:37:53 PM
Merited by ETFbitcoin (1), darosior (1)
 #3

Op!
Set it to 2 always and set yourself free. In relative time lock, for instance you need it to be 2.
darosior
Full Member
***
Offline Offline

Activity: 196
Merit: 223



View Profile WWW
December 13, 2018, 11:35:54 PM
 #4

Ok, thank you both !  Smiley

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!