I think one reason was failure to call .broadcast() on the BroadcastTransaction.
Now I get 'bad-txns-inputs-duplicate' exception. The only input I add to the transaction (since this part is missing from the documentation) is the only one I get from the getUnspents() list from the wallet. The idea is to send the funds from my wallet to this multisig contract. Is this the correct approach? Thank you! On Thursday, December 29, 2016 at 12:29:05 AM UTC+1, Álvaro Castro-Castilla wrote: > > Hi! > > I'm new to Bitcoinj. I'm trying to figure out the following: > I want to create a wallet from where I can spend only with the input of > 2-of-3 keys (a multisig). > > There are these two different texts in the documentation I've been reading: > > > https://bitcoinj.github.io/working-with-contracts#creating-multi-signature-outputs > and > > https://bitcoinj.github.io/working-with-the-wallet#marriedmulti-signature-wallets-and-pluggable-signers > > The first is better documented, and I've been giving it a try. I managed > to: > 1) Create a wallet > 2) Send test bitcoins to the wallet (and check that the btc arrives) > 3) Create a multisig contract with the previous transaction as input (from > getUnspents), and the output being what is described in "Working with > contracts" > > However, I can still spend the funds from the wallet, as if there was no > 2-of-3 contract there. What am I missing? Or is it required to do the > "married wallets" approach that is described in less detail in the other > section? > > Thank you! > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
