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 b535af6a..fe4d99f5 100644 --- a/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java +++ b/core/src/main/java/com/google/bitcoin/store/WalletProtobufSerializer.java @@ -394,6 +394,9 @@ public class WalletProtobufSerializer { wallet.setVersion(walletProto.getVersion()); } + // Make sure the object can be re-used to read another wallet without corruption. + txMap.clear(); + return wallet; }