From 4704375a4ca035b30304b0df4186e5aa383db876 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Fri, 10 Aug 2018 18:55:45 +0530 Subject: [PATCH] Changes to accomodate new wallet.dat types. It ignores some of the new lines added in wallet.dat. Dumping the wallet works for now, other functions may have a problem --- pywallet.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pywallet.py b/pywallet.py index 0ffb33b..b5c7d54 100644 --- a/pywallet.py +++ b/pywallet.py @@ -2108,7 +2108,7 @@ def parse_wallet(db, item_callback): d['comment'] = vds.read_string() elif type == "bestblock": d['nVersion'] = vds.read_int32() - d.update(parse_BlockLocator(vds)) + #d.update(parse_BlockLocator(vds)) elif type == "ckey": d['public_key'] = kds.read_bytes(kds.read_compact_size()) d['encrypted_private_key'] = vds.read_bytes(vds.read_compact_size()) @@ -2499,7 +2499,7 @@ def read_wallet(json_db, db_env, walletfile, print_wallet, print_wallet_transact json_db['acentry'] = (d['account'], d['nCreditDebit'], d['otherAccount'], time.ctime(d['nTime']), d['n'], d['comment']) elif type == "bestblock": - json_db['bestblock'] = d['hashes'][0][::-1].encode('hex_codec') + print("ignored") #json_db['bestblock'] = d['hashes'][0][::-1].encode('hex_codec') elif type == "ckey": crypted=True @@ -5041,8 +5041,3 @@ if __name__ == '__main__': print "Bad private key" db.close() - - - - -