forked from etotheipi/BitcoinArmory
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highest-used addr logic impl! Wlt version updated
- Loading branch information
Showing
6 changed files
with
159 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from armoryengine import * | ||
import CppBlockUtils as Cpp | ||
import armoryengine | ||
|
||
print 'Loading wallets...' | ||
wltPaths = [] | ||
for f in os.listdir(ARMORY_HOME_DIR): | ||
fullPath = os.path.join(ARMORY_HOME_DIR, f) | ||
if os.path.isfile(fullPath) and not fullPath.endswith('backup.wallet'): | ||
openfile = open(fullPath, 'r') | ||
first8 = openfile.read(8) | ||
openfile.close() | ||
if first8=='\xbaWALLET\x00': | ||
wltPaths.append(fullPath) | ||
|
||
for fpath in wltPaths: | ||
wltLoad = PyBtcWallet().readWalletFile(fpath) | ||
wltID = wltLoad.wltUniqueIDB58 | ||
print 'Read wallet:', wltID, 'version:', wltLoad.version | ||
oldPath = wltLoad.walletPath | ||
print 'Will upgrade version to:', oldPath, PYBTCWALLET_VERSION | ||
|
||
fileparts = os.path.splitext(oldPath) | ||
oldBackup = fileparts[0] + 'backup' + fileparts[1] | ||
tempPath = oldPath + '.new_version' | ||
|
||
print 'Forking wallet...' | ||
wltLoad.version = PYBTCWALLET_VERSION | ||
wltLoad.writeFreshWalletFile(tempPath) | ||
|
||
os.remove(oldPath) | ||
os.remove(oldBackup) | ||
shutil.move(tempPath, oldPath) | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters