scripted-diff: test: Remove brackets after assert

-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/assert ?\((.+)\)(( )*)?(#.*)?$/assert \1\3\3\4/g' $(git grep -l --extended-regexp 'assert ?\(' test)
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2019-02-19 17:43:44 -05:00
parent fab5a1e0f4
commit fa0e65b772
41 changed files with 273 additions and 273 deletions

View File

@ -32,12 +32,12 @@ def byte_to_base58(b, version):
# TODO: def base58_decode
def keyhash_to_p2pkh(hash, main = False):
assert (len(hash) == 20)
assert len(hash) == 20
version = 0 if main else 111
return byte_to_base58(hash, version)
def scripthash_to_p2sh(hash, main = False):
assert (len(hash) == 20)
assert len(hash) == 20
version = 5 if main else 196
return byte_to_base58(hash, version)
@ -80,11 +80,11 @@ def check_key(key):
key = hex_str_to_bytes(key) # Assuming this is hex string
if (type(key) is bytes and (len(key) == 33 or len(key) == 65)):
return key
assert(False)
assert False
def check_script(script):
if (type(script) is str):
script = hex_str_to_bytes(script) # Assuming this is hex string
if (type(script) is bytes or type(script) is CScript):
return script
assert(False)
assert False