mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-19 05:35:17 +01:00
ln_pay timeout and sparkwallet testfeatures fix
This commit is contained in:
@@ -124,8 +124,8 @@ checksparkwallet() {
|
|||||||
echo -en "\r\n\e[1;36mTesting Spark Wallet... " > /dev/console
|
echo -en "\r\n\e[1;36mTesting Spark Wallet... " > /dev/console
|
||||||
local rc
|
local rc
|
||||||
|
|
||||||
rc=$(curl -s -o /dev/null -w "%{http_code}" https://gatekeeper/sparkwallet)
|
rc=$(curl -s -o /dev/null -k -w "%{http_code}" https://gatekeeper/sparkwallet/)
|
||||||
[ "${rc}" -ne "200" ] && return 400
|
[ "${rc}" -ne "401" ] && return 400
|
||||||
|
|
||||||
echo -e "\e[1;36mSpark Wallet rocks!" > /dev/console
|
echo -e "\e[1;36mSpark Wallet rocks!" > /dev/console
|
||||||
|
|
||||||
|
|||||||
@@ -296,8 +296,8 @@ ln_pay() {
|
|||||||
# Amount and description is as expected, let's pay!
|
# Amount and description is as expected, let's pay!
|
||||||
trace "[ln_pay] Amount and description are as expected, let's try to pay!"
|
trace "[ln_pay] Amount and description are as expected, let's try to pay!"
|
||||||
|
|
||||||
trace "[ln_pay] ./lightning-cli pay ${bolt11}"
|
trace "[ln_pay] ./lightning-cli pay -k bolt11=${bolt11} retry_for=15"
|
||||||
result=$(./lightning-cli pay ${bolt11})
|
result=$(./lightning-cli pay -k bolt11=${bolt11} retry_for=15)
|
||||||
returncode=$?
|
returncode=$?
|
||||||
trace_rc ${returncode}
|
trace_rc ${returncode}
|
||||||
trace "[ln_pay] result=${result}"
|
trace "[ln_pay] result=${result}"
|
||||||
@@ -335,8 +335,8 @@ ln_pay() {
|
|||||||
trace "[ln_pay] Ok let's deal with pending status with waitsendpay."
|
trace "[ln_pay] Ok let's deal with pending status with waitsendpay."
|
||||||
|
|
||||||
payment_hash=$(echo "${result}" | jq ".data.payment_hash" | tr -d '"')
|
payment_hash=$(echo "${result}" | jq ".data.payment_hash" | tr -d '"')
|
||||||
trace "[ln_pay] ./lightning-cli waitsendpay ${payment_hash}"
|
trace "[ln_pay] ./lightning-cli waitsendpay ${payment_hash} 15"
|
||||||
result=$(./lightning-cli waitsendpay ${payment_hash})
|
result=$(./lightning-cli waitsendpay ${payment_hash} 15)
|
||||||
returncode=$?
|
returncode=$?
|
||||||
trace_rc ${returncode}
|
trace_rc ${returncode}
|
||||||
trace "[ln_pay] result=${result}"
|
trace "[ln_pay] result=${result}"
|
||||||
|
|||||||
Reference in New Issue
Block a user