From rusty at rustcorp.com.au Tue Nov 7 22:21:41 2017 From: rusty at rustcorp.com.au (Rusty Russell) Date: Wed, 08 Nov 2017 08:51:41 +1030 Subject: [Lightning-dev] Question: Invoice In-Reply-To: <CAFDmaN5wkXQHuhNEr669fdMYQFs-R7oX7xpsN2UyLh638F2v9Q@mail.gmail.com> References: <CAFDmaN7YqtnZJa0ir37WUQNyW6_Jfkv89m8CVstR8dG42H-ufQ@mail.gmail.com> <87bmkknooc.fsf@rustcorp.com.au> <d8b4dcd1-23e5-4dfa-9fd1-5249eaa410a4@gmail.com> <CAFDmaN5wkXQHuhNEr669fdMYQFs-R7oX7xpsN2UyLh638F2v9Q@mail.gmail.com> Message-ID: <87efp93f2i.fsf@rustcorp.com.au> Cezary Dziemian <cezary.dziemian at gmail.com> writes: > Thank you very much for answers. It is honor that you answered and it is > also very important for us in Poland. My friend is building Bitcoin ATMs > and off-course plan to use LN. BTW: In Poland a lot of people believe that > LN is the next big thing. We have huge pro-LN community and even have LN > whitepaper translated to polish. > > So for 1.1 such scenario will not be possible?: > > We have such network with such payment channel opened: > > Hub A > / \ > Payer Merchant > \ / > Hub B > > Hub A and Hub B belong to the same person, who will try to cheat us. Now > Payer try to send payment through Hub A to Merchant. Hub A updates HTLC > contract with Payer for this payment but never updates HTLC contract to > Merchant so payment cannot be processed and is "pending". Because payer see > that payment is pending, tries to make payment using Hub B based on the > same invoice. After Marchant reveals secret number to Hub B, Hub A also can > use it to steal funds from first pending payment. Exactly. This is why the payer's wallet will *refuse* to make two payments to the same payment_hash (until one has failed). You need to ask the merchant for another invoice for now. Thanks! Rusty.