mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-19 18:00:39 +01:00
Delete some 0.5 -> 0.6 migration code from WalletTool.
This commit is contained in:
parent
b5b43f3a15
commit
a6f1233b4e
@ -401,11 +401,6 @@ public class WalletProtobufSerializer {
|
||||
return;
|
||||
}
|
||||
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 (confidence.getConfidenceType() != ConfidenceType.BUILDING) {
|
||||
|
@ -318,14 +318,6 @@ public class WalletTool {
|
||||
|
||||
try {
|
||||
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)));
|
||||
if (!wallet.getParams().equals(params)) {
|
||||
System.err.println("Wallet does not match requested network parameters: " +
|
||||
|
Loading…
Reference in New Issue
Block a user