diff options
author | Zero-1729 <zero1729@protonmail.com> | 2021-08-04 19:59:06 +0100 |
---|---|---|
committer | Zero-1729 <zero1729@protonmail.com> | 2021-08-04 19:59:13 +0100 |
commit | 5a1bef60a03b57de708a1a751bd90b8245fd8b83 (patch) | |
tree | 628d3356679e629d56e67ab20827b518c0b7fde5 /test/functional/test_framework/bdb.py | |
parent | 71797beec54d36a055d5e172ecbf2141fa984428 (diff) | |
download | bitcoin-5a1bef60a03b57de708a1a751bd90b8245fd8b83.tar.xz |
test: refactor: remove binascii from test_framework
Diffstat (limited to 'test/functional/test_framework/bdb.py')
-rw-r--r-- | test/functional/test_framework/bdb.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/test_framework/bdb.py b/test/functional/test_framework/bdb.py index 97b9c1d6d0..d623bcdf6e 100644 --- a/test/functional/test_framework/bdb.py +++ b/test/functional/test_framework/bdb.py @@ -24,7 +24,6 @@ transactions. `db_dump -da wallet.dat` is useful to see the data in a wallet.dat BDB file """ -import binascii import struct # Important constants @@ -96,7 +95,7 @@ def dump_meta_page(page): metadata['key_count'] = key_count metadata['record_count'] = record_count metadata['flags'] = flags - metadata['uid'] = binascii.hexlify(uid) + metadata['uid'] = uid.hex().encode() assert magic == BTREE_MAGIC, 'bdb magic does not match bdb btree magic' assert pg_type == BTREE_META, 'Metadata page is not a btree metadata page' @@ -110,8 +109,9 @@ def dump_meta_page(page): metadata['re_pad'] = re_pad metadata['root'] = root metadata['crypto_magic'] = crypto_magic - metadata['iv'] = binascii.hexlify(iv) - metadata['chksum'] = binascii.hexlify(chksum) + metadata['iv'] = iv.hex().encode() + metadata['chksum'] = chksum.hex().encode() + return metadata # Given the dict from dump_leaf_page, get the key-value pairs and put them into a dict |