Author

Topic: Looking for nested if scripts for testing (Read 206 times)

member
Activity: 229
Merit: 13
May 29, 2019, 01:47:09 PM
#2
What about
Code:
OP_IF
  [statements]
OP_ELSE
  [statements]
OP_ELSE
  [statements]
OP_ELSE
  [statements]
OP_ELSE
  [statements]
OP_ENDIF
legendary
Activity: 1039
Merit: 2783
Bitcoin and C♯ Enthusiast
Something like this would be great:
Code:
IF
  [statements]
  IF
     [statements]
  ELSE
     [statements]
  [statements]
ELSE
  [statements]

I can come up with tests myself but then I wouldn't know if it is actually correct (does bitcoin-core RPC work for checking?).
Checked bitcoin-core tests[1] but couldn't find any test cases for non-regular scripts, all of them seem to be for normal (standard) scripts used in regular transactions.

[1] https://github.com/bitcoin/bitcoin/blob/63b9efa73d6bec280241fe0fa06abf7e5b4dde8d/src/test/script_tests.cpp
and txcreatescript... files here https://github.com/bitcoin/bitcoin/tree/master/test/util/data
Jump to: