novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

Wallet contained duplicate transaction #369

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I got this exception on bitcoinj-0.7.2.

Exception in thread "main" java.lang.IllegalStateException: Wallet contained 
duplicate transaction 
4bed2b83d79877a5e33c91f8522e61b1152ab1336bbe4975635c032a4609bd57
    at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
    at com.google.bitcoin.store.WalletProtobufSerializer.readTransaction(WalletProtobufSerializer.java:350)
    at com.google.bitcoin.store.WalletProtobufSerializer.readWallet(WalletProtobufSerializer.java:280)
    at com.google.bitcoin.core.Wallet.loadFromFileStream(Wallet.java:685)
    at com.google.bitcoin.core.Wallet.loadFromFile(Wallet.java:612)

My test wallet is attached to issue

Original issue reported on code.google.com by pshma...@gmail.com on 26 Mar 2013 at 12:37

Attachments:

GoogleCodeExporter commented 9 years ago
Could you give some more info about what you were doing/how you got such a 
wallet?

Original comment by hearn@google.com on 26 Mar 2013 at 4:15

GoogleCodeExporter commented 9 years ago
Can this be due to the issue you just reported?

Original comment by mh.in.en...@gmail.com on 30 Mar 2013 at 5:25

GoogleCodeExporter commented 9 years ago
Oh right, sorry, got confused.

Is your code re-using WalletProtobufSerializer to read more than one wallet?

Original comment by mh.in.en...@gmail.com on 30 Mar 2013 at 5:54

GoogleCodeExporter commented 9 years ago
Hi there

I'm also facing a similar issue. My scenario is the following:

-testnet wallet with 1 pending transaction (outbound). Dumping it with 
wallet-tool gives the output attached:
-connecting to peers shows the transaction is being announced regularly:

01:07:53 14 PeerGroup.announcePendingWalletTransactions: 
[173.236.193.117]:18333: Announcing 1 pending wallet transactions

-Tried to reset all transactions via wallet-tool yelds the following:

$ ./wallet-tool --action=RESET --wallet=/srv/store/TEST/wallet/nodebit.wallet 
--net=TEST --debuglog
01:12:40 10 WalletTool.main: Starting up ...
Failed to load wallet '/srv/store/TEST/wallet/nodebit.wallet': Wallet contained 
duplicate transaction 
7459fc1f1513af1d5f7af3dfa13685c45e6ae952545e987cd6e9de76206954c6
java.lang.IllegalStateException: Wallet contained duplicate transaction 
7459fc1f1513af1d5f7af3dfa13685c45e6ae952545e987cd6e9de76206954c6
    at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
    at com.google.bitcoin.store.WalletProtobufSerializer.readTransaction(WalletProtobufSerializer.java:351)
    at com.google.bitcoin.store.WalletProtobufSerializer.readWallet(WalletProtobufSerializer.java:276)
    at com.google.bitcoin.tools.WalletTool.main(WalletTool.java:321)

-after this attempts to load the wallet fail in the same way

Wallet also attached. Running on bitcoinj-0.8-SNAPSHOT

Original comment by f.viv...@gmail.com on 6 Apr 2013 at 11:22

Attachments:

GoogleCodeExporter commented 9 years ago
By the way, I've seen http://code.google.com/p/bitcoinj/issues/detail?id=380 
but I don't think this is related to reusing the same serializer, as this 
happens between two separate runs of wallet-tool.

Original comment by f.viv...@gmail.com on 6 Apr 2013 at 11:26