Skip to content

Commit

Permalink
Test for hex strings and remove stray newline from rpc_named_arguments.
Browse files Browse the repository at this point in the history
Github-Pull: #2779
Rebased-From: 8488f7e
  • Loading branch information
tecnovert authored and Fuzzbawls committed Nov 22, 2022
1 parent 2b244ba commit ba310d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions test/functional/rpc_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ def _test_getblock(self):

# Test getblock verbosity
besthash = node.getbestblockhash()
assert(isinstance(node.getblock(blockhash=besthash, verbose=False), str))
assert(isinstance(node.getblock(blockhash=besthash, verbosity=0), str))
assert(isinstance(node.getblock(besthash, 1)['tx'][0], str))
assert(isinstance(node.getblock(besthash, True)['tx'][0], str))
assert('vin' in node.getblock(besthash, 2)['tx'][0])
assert_is_hex_string(node.getblock(blockhash=besthash, verbose=False))
assert_is_hex_string(node.getblock(blockhash=besthash, verbosity=0))

assert_is_hash_string(node.getblock(besthash, 1)['tx'][0])
assert_is_hash_string(node.getblock(besthash, True)['tx'][0])
assert_is_hex_string(node.getblock(besthash, 2)['tx'][0]['vin'][0]['coinbase']);


if __name__ == '__main__':
Expand Down
1 change: 0 additions & 1 deletion test/functional/rpc_named_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ def run_test(self):
assert_equal(node.echo(arg9=None), [None]*10)
assert_equal(node.echo(arg0=0,arg3=3,arg9=9), [0] + [None]*2 + [3] + [None]*5 + [9])


if __name__ == '__main__':
NamedArgumentTest().main()

0 comments on commit ba310d1

Please sign in to comment.