Skip to content

update scripts using sendtoroute, option --route is now --nodeIds #4

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/multipart_timeout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ echo Awaiting broadcast network state...
sleep 60

echo Paying multi-part invoice first part
PAYMENT_ID_1=$(alice-eclair-cli sendtoroute --amountMsat=100000000 --paymentHash=$PAYMENT_HASH --route=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=144 --invoice=$INVOICE)
PAYMENT_ID_1=$(alice-eclair-cli sendtoroute --amountMsat=100000000 --paymentHash=$PAYMENT_HASH --nodeIds=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=144 --invoice=$INVOICE | jq .parentId)
echo $PAYMENT_ID_1

echo Paying multi-part invoice second part
PAYMENT_ID_2=$(alice-eclair-cli sendtoroute --amountMsat=100000000 --paymentHash=$PAYMENT_HASH --route=$ALICE_ID,$CAROL_ID,$DAVE_ID --finalCltvExpiry=144 --invoice=$INVOICE)
PAYMENT_ID_2=$(alice-eclair-cli sendtoroute --amountMsat=100000000 --paymentHash=$PAYMENT_HASH --nodeIds=$ALICE_ID,$CAROL_ID,$DAVE_ID --finalCltvExpiry=144 --invoice=$INVOICE | jq .parentId)
echo $PAYMENT_ID_2

echo Waiting for a timeout...
Expand Down
8 changes: 4 additions & 4 deletions scripts/send_to_route.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ bob-eclair-cli connect --uri=$CAROL_ID@localhost:9737
bob-eclair-cli open --nodeId=$CAROL_ID --fundingSatoshis=500000

echo Generating a few blocks to confirm channels...
MINER=$(bitcoin-cli getnewaddress)
bitcoin-cli generatetoaddress 10 $MINER
MINER=$(btc-cli getnewaddress)
btc-cli generatetoaddress 10 $MINER

echo Awaiting confirmations...
sleep 30
Expand All @@ -39,14 +39,14 @@ echo Awaiting broadcast network state...
sleep 60

echo Paying first invoice
PAYMENT_ID1=$(alice-eclair-cli sendtoroute --amountMsat=250000000 --route=$ALICE_ID,$BOB_ID,$CAROL_ID --finalCltvExpiry=16 --invoice=$INVOICE1 | jq .parentId)
PAYMENT_ID1=$(alice-eclair-cli sendtoroute --amountMsat=250000000 --nodeIds=$ALICE_ID,$BOB_ID,$CAROL_ID --finalCltvExpiry=16 --invoice=$INVOICE1 | jq .parentId)
sleep 10

echo Checking payment status...
alice-eclair-cli getsentinfo --id=$PAYMENT_ID1

echo Paying second invoice
PAYMENT_ID2=$(alice-eclair-cli sendtoroute --amountMsat=200000000 --route=$ALICE_ID,$BOB_ID,$CAROL_ID --finalCltvExpiry=16 --invoice=$INVOICE2 | jq .parentId)
PAYMENT_ID2=$(alice-eclair-cli sendtoroute --amountMsat=200000000 --nodeIds=$ALICE_ID,$BOB_ID,$CAROL_ID --finalCltvExpiry=16 --invoice=$INVOICE2 | jq .parentId)
sleep 10

echo Checking payment status...
Expand Down
10 changes: 5 additions & 5 deletions scripts/send_to_route_multipart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ carol-eclair-cli connect --uri=$DAVE_ID@localhost:9738
carol-eclair-cli open --nodeId=$DAVE_ID --fundingSatoshis=245000

echo Generating a few blocks to confirm channels...
MINER=$(bitcoin-cli getnewaddress)
bitcoin-cli generatetoaddress 10 $MINER
MINER=$(btc-cli getnewaddress)
btc-cli generatetoaddress 10 $MINER

echo Awaiting confirmations...
sleep 30
Expand All @@ -49,11 +49,11 @@ echo Awaiting broadcast network state...
sleep 60

echo Paying invoice
PAYMENT=$(alice-eclair-cli sendtoroute --amountMsat=230000000 --route=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE)
PAYMENT=$(alice-eclair-cli sendtoroute --amountMsat=230000000 --nodeIds=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE)
echo $PAYMENT
PARENT_ID=$(echo $PAYMENT | jq .parentId)
alice-eclair-cli sendtoroute --amountMsat=220000000 --parentId=$PARENT_ID --route=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE
alice-eclair-cli sendtoroute --amountMsat=150000000 --parentId=$PARENT_ID --route=$ALICE_ID,$CAROL_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE
alice-eclair-cli sendtoroute --amountMsat=220000000 --parentId=$PARENT_ID --nodeIds=$ALICE_ID,$BOB_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE
alice-eclair-cli sendtoroute --amountMsat=150000000 --parentId=$PARENT_ID --nodeIds=$ALICE_ID,$CAROL_ID,$DAVE_ID --finalCltvExpiry=16 --invoice=$INVOICE

sleep 10

Expand Down
4 changes: 2 additions & 2 deletions scripts/send_to_route_trampoline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ sleep 60

echo Paying trampoline invoice
# Note that the trampoline fee must be the same and needs to be taken into account in the amountMsat values.
PAYMENT1=$(alice-eclair-cli sendtoroute --amountMsat=160050000 --route=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$DAVE_ID --trampolineFeesMsat=80000 --trampolineCltvExpiry=432 --finalCltvExpiry=16 --invoice=$INVOICE)
PAYMENT1=$(alice-eclair-cli sendtoroute --amountMsat=160050000 --nodeIds=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$DAVE_ID --trampolineFeesMsat=80000 --trampolineCltvExpiry=432 --finalCltvExpiry=16 --invoice=$INVOICE)
echo $PAYMENT1
PARENT_ID=$(echo $PAYMENT1 | jq .parentId)
SECRET=$(echo $PAYMENT1 | jq .trampolineSecret)
PAYMENT2=$(alice-eclair-cli sendtoroute --amountMsat=150030000 --parentId=$PARENT_ID --trampolineSecret=$SECRET --route=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$DAVE_ID --trampolineFeesMsat=80000 --trampolineCltvExpiry=432 --finalCltvExpiry=16 --invoice=$INVOICE)
PAYMENT2=$(alice-eclair-cli sendtoroute --amountMsat=150030000 --parentId=$PARENT_ID --trampolineSecret=$SECRET --nodeIds=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$DAVE_ID --trampolineFeesMsat=80000 --trampolineCltvExpiry=432 --finalCltvExpiry=16 --invoice=$INVOICE)
echo $PAYMENT2

sleep 15
Expand Down
4 changes: 2 additions & 2 deletions scripts/trampoline_multipart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ sleep 60

echo Paying trampoline invoice
# Note that the trampoline fee must be the same and needs to be taken into account in the amountMsat values.
PAYMENT1=$(alice-eclair-cli sendtoroute --amountMsat=220010000 --route=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$CAROL_ID --trampolineFeesMsat=50000 --trampolineCltvExpiry=144 --finalCltvExpiry=16 --invoice=$INVOICE)
PAYMENT1=$(alice-eclair-cli sendtoroute --amountMsat=220010000 --nodeIds=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$CAROL_ID --trampolineFeesMsat=50000 --trampolineCltvExpiry=144 --finalCltvExpiry=16 --invoice=$INVOICE)
echo $PAYMENT1
PARENT_ID=$(echo $PAYMENT1 | jq .parentId)
SECRET=$(echo $PAYMENT1 | jq .trampolineSecret)
PAYMENT2=$(alice-eclair-cli sendtoroute --amountMsat=200040000 --parentId=$PARENT_ID --trampolineSecret=$SECRET --route=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$CAROL_ID --trampolineFeesMsat=50000 --trampolineCltvExpiry=144 --finalCltvExpiry=16 --invoice=$INVOICE)
PAYMENT2=$(alice-eclair-cli sendtoroute --amountMsat=200040000 --parentId=$PARENT_ID --trampolineSecret=$SECRET --nodeIds=$ALICE_ID,$BOB_ID --trampolineNodes=$BOB_ID,$CAROL_ID --trampolineFeesMsat=50000 --trampolineCltvExpiry=144 --finalCltvExpiry=16 --invoice=$INVOICE)
echo $PAYMENT2

sleep 10
Expand Down