-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
itest: add new testCustomChannelsHtlcSuccess itest #901
base: update-to-lnd-18-4
Are you sure you want to change the base?
Conversation
d53e5ea
to
8754bcb
Compare
b5d747e
to
a03fbdc
Compare
Pushed up a rebase. |
itests are racy right now due to sweeper/block timing, experimenting with either using |
f4e5fcd
to
ec050fb
Compare
ec050fb
to
2c3edb6
Compare
Pushed up a rebase to reference the latest version of lightninglabs/taproot-assets#1154. |
2c3edb6
to
65c7d8f
Compare
Updated to ref the latest |
8754bcb
to
c4900cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Wasn't able to get the test to run on my machine even after many tries. So perhaps this isn't the latest version yet?
// Bob's balance should now reflect that he's gained the value of the HTLC, | ||
// in addition to his settled balance. | ||
// | ||
// TODO(roasbeef): -1 as no decimal display on asset? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that seems to be the likely cause.
// transaction. | ||
mineBlocks(t, net, 1, 1) | ||
|
||
// TODO(roasbeef): assert transfers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asserting that the correct proofs can be found in the universe would also be a great check.
itest/litd_test_list_on_test.go
Outdated
@@ -48,6 +48,10 @@ var allTestCases = []*testCase{ | |||
name: "test custom channels liquidity", | |||
test: testCustomChannelsLiquidityEdgeCases, | |||
}, | |||
{ | |||
name: "test custom channels htlc success", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we'll also want to add a test case for timing out the HTLCs, instead of resolving them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad test name here. We timeout out HTLCs at the very end of the itest when we mine enough blocks to timeout the HTLCs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this tests all 4 scenarios we about ( (local, remote) x (success, timeout) ), it does it all in one sweep with Alice's commitment that she force closed. I'll change the name of the test to better reflect what's covered.
048c654
to
a8e4310
Compare
Pushed up a new version! Ran this for 30 minutes on my laptop and didn't get a flake. If it flakes on CI, I should be able to address it easily, given all the quality time spent with this test. I also added a final assertion to make sure both Alice and Bob can send all the swept funds to a 3rd party. |
This commit represents the main integration between lnd running in integrated mode and tapd providing auxiliary components for custom channels.
This change will speed up integration tests by not waiting a full 5 seconds before re-trying the connection to lnd if it fails the first time.
Add the `priceoraclerpc`, `rfqrpc`, and the `tapchannelrpc` JSON callbacks to the litclient's `Registrations` array. This allows the litclient to use the rpc functions contained in these JSON callbacks.
Add testCustomChannelsMultiInput to verify multi-input channel funding. In this test Charlie mints an asset, transfers it to Dave in two separate txs. Dave then uses both asset UTXOs to fund a channel with Charlie that is bigger than the value of either UTXO.
This commit adds a fully configurable RPC oracle that can serve asset rates that differ for buy and sell. We then add a test that shows and asserts proper asset conversion to satoshis and back.
With this commit we sporadically assert in our itests that the outgoing HTLCs for a payment and the incoming HTLCs of an invoice show the custom channel data JSON with the actual asset amounts.
This commit removes the default value of 1 for `sat_per_vbyte` that's being passed to `litd` rpc endpoint `fundchannel`. `litd` handles this now perfectly on its own, and adding logic here only adds to the confusion.
This commit adds an integration test for the MinRelayFee check. The test ensures that transactions with fees below the minimum relay fee are rejected.
c4900cf
to
7d03a39
Compare
83bb946
to
a374019
Compare
This will report balance that we can 100% spend.
This is useful as sometimes we just want to return once the HTLC has been accepted, like when we're paying hodl invoices.
In this commit, we add a new itest that tests the 4 sweeping cases for HTLCs: * local success * remote success * local timeout * remote timeout To test this, we have Alice load up her commitment transaction with 4 HTLCs (2 incoming, 2 outgoing) using hodl invoices. Then we force close her commitment transaction. In this scenario, she needs to broadcast a second level transaction to ultimately timeout, while Bob can sweep directly from the commitment transaction.
a374019
to
d7775e0
Compare
7d03a39
to
7cb58a5
Compare
No description provided.