Hennadii Stepanov
a0473442d1
scripted-diff: Add `__file__` argument to `BitcoinTestFramework.init()`
...
-BEGIN VERIFY SCRIPT-
sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py)
sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py
-END VERIFY SCRIPT-
4 months ago
furszy
cc781a2180
descriptor: InferScript, do not return top-level only func as sub descriptor
...
e.g. sh(addr(ADDR)) or sh(raw(HEX)) are invalid descriptors.
Making sh and wsh top level functions to return addr/raw descriptors when
the subscript inference fails.
1 year ago
Andrew Chow
73ec4b2a83
tests: decodescript can infer descriptors for scripts >520 bytes
2 years ago
Antoine Poinsot
dfc9acbf01
rpc: decode Miniscript descriptor when possible in decodescript
...
The descriptor inference logic would previously always use a dummy
signing provider and would never analyze the witness script of a P2WSH
scriptPubKey.
Note even a valid Miniscript might not always be decodable from Script
without more contextual information (for instance the key preimage for a
pk_h).
2 years ago
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2 years ago
Jon Atack
48742693ac
Replace "can not" with "cannot" in docs, user messages, and tests
3 years ago
Dimitri
b35942e500
tests: Add data-driven testcases to rpc_decodescript.py
3 years ago
Sebastian Falbesoner
83f6c0f9ef
test: add decodescript RPC test for P2TR output type
3 years ago
Sebastian Falbesoner
099c6957de
test: check for decodescript RPC 'type' results
3 years ago
Sebastian Falbesoner
0d43525c61
test: add logging to rpc_decodescript.py
...
Also remove the enumerations ("1)", "2)"...) from the test
cases as those potentially hinder maintainability; e.g. if a
new case in inserted in-between, all the remaining
enumerations would need to be adapted.
3 years ago
MarcoFalke
fac23c2114
scripted-diff: Bump copyright headers
...
The previous diff touched most files in ./test/, so bump the headers to
avoid having to touch them again for a bump later.
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
3 years ago
Sebastian Falbesoner
ca6c154ef1
test: refactor: remove `hex_str_to_bytes` helper
...
Use the built-in class method bytes.fromhex() instead,
which is available since Python 3.0.
3 years ago
Sebastian Falbesoner
2ce7b47958
test: introduce `tx_from_hex` helper for tx deserialization
...
`FromHex` is mostly used for transactions, so we introduce a
shortcut `tx_from_hex` for `FromHex(CTransaction, hex_str)`.
3 years ago
MarcoFalke
faa7cdf764
scripted-diff: Update copyright in ./test
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
6 years ago
MarcoFalke
fa6bf21f5e
scripted-diff: test: Use py3.5 bytes::hex() method
...
-BEGIN VERIFY SCRIPT-
sed -i -e "s/def bytes_to_hex_str/def b_2_x/g" $(git grep -l bytes_to_hex_str)
export RE_B_0="[^()]*" # match no bracket
export RE_B_1="${RE_B_0}\(${RE_B_0}\)${RE_B_0}" # match exactly one ()
export RE_B_2="${RE_B_0}\(${RE_B_1}\)${RE_B_0}" # match wrapped (())
export RE_M="(b2x|bytes_to_hex_str)\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\)"
sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l -E '(b2x|bytes_to_hex_str)')
sed -i --regexp-extended -e "/ +bytes_to_hex_str( as b2x)?,/d" $(git grep -l bytes_to_hex_str)
sed -i --regexp-extended -e "s/ +bytes_to_hex_str( as b2x)?,//g" $(git grep -l bytes_to_hex_str)
sed -i --regexp-extended -e "s/, bytes_to_hex_str( as b2x)?//g" $(git grep -l bytes_to_hex_str)
export RE_M="(binascii\.)?hexlify\(((${RE_B_0}|${RE_B_1}|${RE_B_2})*)\).decode\(${RE_B_0}\)"
sed -i --regexp-extended -e "s/${RE_M}/\2.hex()/g" $(git grep -l hexlify -- ':(exclude)share')
sed -i --regexp-extended -e "/from binascii import hexlify$/d" $(git grep -l hexlify -- ':(exclude)share')
sed -i --regexp-extended -e "s/(from binascii import) .*hexlify/\1 unhexlify/g" $(git grep -l hexlify -- ':(exclude)share')
sed -i -e 's/ignore-names "/ignore-names "b_2_x,/g' ./test/lint/lint-python-dead-code.sh
-END VERIFY SCRIPT-
6 years ago
practicalswift
68400d8b96
tests: Use explicit imports
6 years ago
DrahtBot
eb7daf4d60
Update copyright headers to 2018
6 years ago
fivepiece
4f933b3d23
p2wpkh, p2wsh and p2sh-nested scripts in decodescript
...
plus tests
7 years ago
Anthony Towns
81b79f2c39
[tests] Rename rpc_* functional tests.
7 years ago