1
0

lnchannel: test for max htlc value (needs to be below protocol maximum)

This commit is contained in:
SomberNight
2020-03-26 06:25:26 +01:00
parent 777e350fae
commit 53c6fc8cf1
4 changed files with 51 additions and 16 deletions

View File

@@ -171,7 +171,7 @@ if [[ $1 == "redeem_htlcs" ]]; then
new_blocks 3
wait_until_channel_open alice
# alice pays bob
invoice=$($bob add_lightning_request 0.05 -m "test")
invoice=$($bob add_lightning_request 0.04 -m "test")
$alice lnpay $invoice --timeout=1 || true
unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent')
if [[ "$unsettled" == "0" ]]; then
@@ -213,7 +213,7 @@ if [[ $1 == "breach_with_unspent_htlc" ]]; then
new_blocks 3
wait_until_channel_open alice
echo "alice pays bob"
invoice=$($bob add_lightning_request 0.05 -m "test")
invoice=$($bob add_lightning_request 0.04 -m "test")
$alice lnpay $invoice --timeout=1 || true
unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent')
if [[ "$unsettled" == "0" ]]; then
@@ -242,7 +242,7 @@ if [[ $1 == "breach_with_spent_htlc" ]]; then
new_blocks 3
wait_until_channel_open alice
echo "alice pays bob"
invoice=$($bob add_lightning_request 0.05 -m "test")
invoice=$($bob add_lightning_request 0.04 -m "test")
$alice lnpay $invoice --timeout=1 || true
ctx=$($alice get_channel_ctx $channel --iknowwhatimdoing)
unsettled=$($alice list_channels | jq '.[] | .local_unsettled_sent')
@@ -284,7 +284,7 @@ if [[ $1 == "breach_with_spent_htlc" ]]; then
$bob daemon -d
sleep 1
$bob load_wallet
wait_for_balance bob 0.049
wait_for_balance bob 0.039
$bob getbalance
fi