rgb-cln/wallet/test
Rusty Russell 38e8601cf6 wallet: abstract away delayed entry of wallet_payment.
For performance, we delay entering the 'wallet_payment' into the db
until we actually commit to the HTLC (when we have to touch the DB
anyway).

This opens a race where we can try to pay twice, and since it's not in
the database yet, we don't notice the duplicate.

So remove the temporary payment field from htlc_out, which was always
an uncomfortable hack, and make the wallet code abstract over the
deferred entry a little by maintaining a 'unstored_payments' list
and incorporating that in results.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-17 23:55:35 +01:00
..
.gitignore wallet: move tests into test/ dir like other unit tests. 2017-12-13 22:46:10 +01:00
Makefile invoices: Extensive reorganization of invoice system. 2018-01-16 13:03:54 +01:00
run-db.c db: log a message to say whether we created or updated db. 2018-01-02 13:21:25 +01:00
run-wallet.c wallet: abstract away delayed entry of wallet_payment. 2018-01-17 23:55:35 +01:00
test_utils.h wallet: move tests into test/ dir like other unit tests. 2017-12-13 22:46:10 +01:00