Ok, this is what I think happened:
- wallet creates and sends a transaction tx1 with 2 outputs: 0 (change) and 
1 (to someone else)
- output tx1:1 is spend by tx2
- tx2 is confirmed (at least twice)
- tx2 is reorged out (i.e it never gets published again)  
- wallet complains that tx1:1 is spend by tx2 but does not have tx2

What I don't understand is how tx1:1 got marked as spent by tx2 in the 
first place since it is not one of our wallet output ?
Does this scenario make sense ?

On Wednesday, 27 September 2017 14:02:27 UTC+2, Fabrice Drouin wrote:
>
> bitcoinj logs can be found there: https://pastebin.com/RthL8NsL
>
>
> On Wednesday, 27 September 2017 10:08:32 UTC+2, Fabrice Drouin wrote:
>>
>> I'm using https://github.com/ACINQ/bitcoinj/tree/segwit-newmode @ 
>> 2165efe which is our fork of bitcoinj/segwit. Once I isolate the problem 
>> and have a clean test on regtest I may be able to run he same test against 
>> master. I'm trying to understand what could cause such an inconsistency in 
>> the wallet (the second tx is missing from the wallet's tx list, it's not a 
>> case of txs that are out of order).
>>
>> On Tuesday, 26 September 2017 22:15:57 UTC+2, Andreas Schildbach wrote:
>>>
>>> What bitcoinj branch/tag/commit are you testing this on? 
>>>
>>>
>>> On 09/26/2017 05:14 PM, Fabrice Drouin wrote: 
>>> > Hi, 
>>> > 
>>> > I'm trying to investigate a problem where wallets cannot be loaded 
>>> from 
>>> > backups anymore: readWallet throws 
>>> > org.bitcoinj.wallet.UnreadableWalletException: Could not connect 
>>> <txid1> 
>>> > to <txid2> 
>>> > This happens on testnet, and <txid2> cannot be found anymore. Before 
>>> it 
>>> > happended, chains of unconfirmed transactions add been published (i.e 
>>> > unconfirmed transactions that spend other unconfirmed transactions. 
>>> > They're all segwit txs and cannot be malleated). I suspect that it was 
>>> > caused by a reorg but have not yet been able to reproduce the problem 
>>> on 
>>> > regtest. I also don't have the bitcoinj logs... 
>>> > 
>>> > It seems to be similar to 
>>> > https://github.com/Multibit-Legacy/multibit-hd/issues/781 for which I 
>>> > could not find much info (caused by malleated transactions ?) 
>>> > 
>>> > Thanks, 
>>> > 
>>> > Fabrice 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> > Groups "bitcoinj" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> > an email to bitcoinj+u...@googlegroups.com 
>>> > <mailto:bitcoinj+u...@googlegroups.com>. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bitcoinj+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to