You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
The agent was ported into the SDK out of an example and its functionality was driven by the example. If this code is to be lifted from example and into library code we should test it without the example by writing tests that use it.
The text was updated successfully, but these errors were encountered:
Update escrow account on-network balance that is cached in the channel whenever sending or receiving a payment that looks like it exceeds the last known available balance.
If a payment is exceeding the balance the only option we have is to stop and close the channel, so we may as check the network to see if the balance is updated which might allow the payment to succeed.
I think the usefulness of this balance update is questionable given we will soon have the agent using the state's ingestion to update the balances, but in the interim I need to update the balances one way or another to get tests I'm writing for #225 and #226 to pass. This seems like a good temporary hold over and something we can evaluate in the near future if we still need.
I removed the TODO to remove the existing check because it's a little fuzzy to me if we really want to do that.
There's no test in this PR for this change because I'm writing tests for the agent in #242 which incorporates a few things that make writing tests for the agent much more straight forward.
leighmcculloch
changed the title
sdk/agent: add tests for common usage patterns
sdk/agent: add tests for happy path
Aug 26, 2021
Add a first happy path test that exercises two agents that are connected to each other and successfully open, pay, and close.
The agent code was ported over from the console example. The console example was really written to be throw away code, but the agent code within it was well formed enough to be something to build on. It's important we add tests early for the agent before we build too much more into it. This is a first step to closing #225.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The agent was ported into the SDK out of an example and its functionality was driven by the example. If this code is to be lifted from example and into library code we should test it without the example by writing tests that use it.
The text was updated successfully, but these errors were encountered: