From d3a540bb1e1eb6c032c87a80bc35ece3b3f1dff0 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sun, 9 Sep 2012 14:45:34 +0200 Subject: [PATCH] Fix a bug where we'd attempt to migrate depths of pending transactions. --- .../java/com/google/bitcoin/store/WalletProtobufSerializer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java b/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java index 7dfbe528a..15fce75e8 100644 --- a/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java +++ b/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java @@ -403,7 +403,7 @@ public class WalletProtobufSerializer { confidence.setDepthInBlocks(confidenceProto.getDepth()); } else { // TEMPORARY CODE FOR MIGRATING 0.5 WALLETS TO 0.6 - if (chainHeight != 0) { + if (chainHeight != 0 && confidenceProto.hasAppearedAtHeight()) { confidence.setDepthInBlocks(chainHeight - confidence.getAppearedAtChainHeight() + 1); } }