Bitcoin Forum
September 19, 2018, 04:12:34 AM *
News: ♦♦ Bitcoin Core users must update to 0.16.3 [Torrent]. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Valid transaction  (Read 772 times)
jackjack
Legendary
*
Offline Offline

Activity: 1134
Merit: 1013


May Bitcoin be touched by his Noodly Appendage


View Profile
May 27, 2013, 12:23:09 PM
 #1

The wiki says that "a transaction is valid if nothing in the combined script triggers failure and the top stack item is true (non-zero)"
But "x==OP_TRUE" != "x!=OP_0"
So which one is correct?

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
1537330354
Hero Member
*
Offline Offline

Posts: 1537330354

View Profile Personal Message (Offline)

Ignore
1537330354
Reply with quote  #2

1537330354
Report to moderator
1537330354
Hero Member
*
Offline Offline

Posts: 1537330354

View Profile Personal Message (Offline)

Ignore
1537330354
Reply with quote  #2

1537330354
Report to moderator
1537330354
Hero Member
*
Offline Offline

Posts: 1537330354

View Profile Personal Message (Offline)

Ignore
1537330354
Reply with quote  #2

1537330354
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537330354
Hero Member
*
Offline Offline

Posts: 1537330354

View Profile Personal Message (Offline)

Ignore
1537330354
Reply with quote  #2

1537330354
Report to moderator
1537330354
Hero Member
*
Offline Offline

Posts: 1537330354

View Profile Personal Message (Offline)

Ignore
1537330354
Reply with quote  #2

1537330354
Report to moderator
crary
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
May 27, 2013, 03:23:38 PM
 #2

Actually, neither one is correct (even if you blur the distinction between a constant and the opcode that pushes it).  There are lots of representations of true, and -- since the script manipulates byte strings, not integers -- there are lots of representations of false as well.

Also, the way I read the code, OP_0 doesn't actually work, but I could be confused.  I'd like it if someone better familiar with the code than I could weigh in on that.
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!