3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

Delete some 0.5 -> 0.6 migration code from WalletTool.

This commit is contained in:
Mike Hearn 2013-01-12 00:40:27 +01:00
parent b5b43f3a15
commit a6f1233b4e
2 changed files with 0 additions and 13 deletions

View File

@ -401,11 +401,6 @@ public class WalletProtobufSerializer {
return; return;
} }
confidence.setDepthInBlocks(confidenceProto.getDepth()); confidence.setDepthInBlocks(confidenceProto.getDepth());
} else {
// TEMPORARY CODE FOR MIGRATING 0.5 WALLETS TO 0.6
if (chainHeight != 0 && confidenceProto.hasAppearedAtHeight()) {
confidence.setDepthInBlocks(chainHeight - confidence.getAppearedAtChainHeight() + 1);
}
} }
if (confidenceProto.hasWorkDone()) { if (confidenceProto.hasWorkDone()) {
if (confidence.getConfidenceType() != ConfidenceType.BUILDING) { if (confidence.getConfidenceType() != ConfidenceType.BUILDING) {

View File

@ -318,14 +318,6 @@ public class WalletTool {
try { try {
WalletProtobufSerializer loader = new WalletProtobufSerializer(); WalletProtobufSerializer loader = new WalletProtobufSerializer();
if (chainFileName.exists() && modeFlag.value(options).equals(ValidationMode.SPV)) {
// TEMPORARY MIGRATION CODE FOR 0.5 -> 0.6 TRANSITION. This will ensure the depth (but NOT workDone)
// fields gets set correctly for older wallets.
store = new BoundedOverheadBlockStore(params, chainFileName);
loader.setChainHeight(store.getChainHead().getHeight());
store.close();
store = null;
}
wallet = loader.readWallet(new BufferedInputStream(new FileInputStream(walletFile))); wallet = loader.readWallet(new BufferedInputStream(new FileInputStream(walletFile)));
if (!wallet.getParams().equals(params)) { if (!wallet.getParams().equals(params)) {
System.err.println("Wallet does not match requested network parameters: " + System.err.println("Wallet does not match requested network parameters: " +