mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-28 06:50:38 +01:00
test: refactor: remove binascii from test_framework
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user