mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
testdata: add liquidity sessions
This commit is contained in:
parent
541e0e00fc
commit
662f954e0f
19 changed files with 2431 additions and 0 deletions
108
cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json
vendored
Normal file
108
cmd/loop/testdata/sessions/liquidity/01_loop-getparams.json
vendored
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"getparams",
|
||||
"--network",
|
||||
"regtest"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 213058408,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 212,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 212,
|
||||
"kind": "stdout",
|
||||
"data": {
|
||||
"lines": [
|
||||
"{\n",
|
||||
" \"account\": \"\",\n",
|
||||
" \"account_addr_type\": \"ADDRESS_TYPE_UNKNOWN\",\n",
|
||||
" \"auto_max_in_flight\": \"1\",\n",
|
||||
" \"autoloop\": false,\n",
|
||||
" \"autoloop_budget_last_refresh\": \"1770076824\",\n",
|
||||
" \"autoloop_budget_refresh_period_sec\": \"604800\",\n",
|
||||
" \"autoloop_budget_sat\": \"335544\",\n",
|
||||
" \"autoloop_budget_start_sec\": \"0\",\n",
|
||||
" \"autoloop_dest_address\": \"\",\n",
|
||||
" \"easy_asset_params\": {},\n",
|
||||
" \"easy_autoloop\": false,\n",
|
||||
" \"easy_autoloop_excluded_peers\": [],\n",
|
||||
" \"easy_autoloop_local_target_sat\": \"0\",\n",
|
||||
" \"failure_backoff_sec\": \"86400\",\n",
|
||||
" \"fast_swap_publication\": true,\n",
|
||||
" \"fee_ppm\": \"20000\",\n",
|
||||
" \"htlc_conf_target\": 6,\n",
|
||||
" \"max_miner_fee_sat\": \"0\",\n",
|
||||
" \"max_prepay_routing_fee_ppm\": \"0\",\n",
|
||||
" \"max_prepay_sat\": \"0\",\n",
|
||||
" \"max_routing_fee_ppm\": \"0\",\n",
|
||||
" \"max_swap_amount\": \"0\",\n",
|
||||
" \"max_swap_fee_ppm\": \"0\",\n",
|
||||
" \"min_swap_amount\": \"0\",\n",
|
||||
" \"rules\": [],\n",
|
||||
" \"sweep_conf_target\": 100,\n",
|
||||
" \"sweep_fee_rate_sat_per_vbyte\": \"0\"\n",
|
||||
"}\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 213,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
92
cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json
vendored
Normal file
92
cmd/loop/testdata/sessions/liquidity/02_loop-setparams-no-flags.json
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "at least one flag required to set params",
|
||||
"duration": 150177446,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 5,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 149,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 150,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] at least one flag required to set params\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 150,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "at least one flag required to set params"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
123
cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json
vendored
Normal file
123
cmd/loop/testdata/sessions/liquidity/03_loop-setparams-feepercent.json
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--feepercent",
|
||||
"2"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 249608692,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 6,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 188,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 189,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 248,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 249,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
96
cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json
vendored
Normal file
96
cmd/loop/testdata/sessions/liquidity/04_loop-setparams-feepercent-conflict.json
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--feepercent",
|
||||
"2",
|
||||
"--sweeplimit",
|
||||
"1"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "feepercent cannot be set with specific fee category flags",
|
||||
"duration": 161206474,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 4,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 159,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 161,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] feepercent cannot be set with specific fee category flags\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 161,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "feepercent cannot be set with specific fee category flags"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
93
cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json
vendored
Normal file
93
cmd/loop/testdata/sessions/liquidity/05_loop-setrule-missing-threshold.json
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"034fa8802fdc9f8c137e8f2cce2e4d30e590a1314e16bd060ac7d772dc698ff4bc"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "provide at least one flag to set rules or use the --clear flag to remove rules",
|
||||
"duration": 143258905,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 2,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 142,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 143,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] provide at least one flag to set rules or use the --clear flag to remove rules\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 143,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "provide at least one flag to set rules or use the --clear flag to remove rules"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
35
cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json
vendored
Normal file
35
cmd/loop/testdata/sessions/liquidity/06_loop-setrule-no-args.json
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "please set a channel id or peer pubkey for the rule update",
|
||||
"duration": 1924009,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] please set a channel id or peer pubkey for the rule update\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "please set a channel id or peer pubkey for the rule update"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
58
cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json
vendored
Normal file
58
cmd/loop/testdata/sessions/liquidity/07_loop-suggestswaps.json
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"suggestswaps",
|
||||
"--network",
|
||||
"regtest"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "no rules set for autolooper, please set rules using the setrule command",
|
||||
"duration": 178932401,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SuggestSwaps",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SuggestSwapsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 178,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SuggestSwaps",
|
||||
"event": "error",
|
||||
"error": "rpc error: code = FailedPrecondition desc = no rules set for autoloop",
|
||||
"status": {
|
||||
"code": 9,
|
||||
"message": "no rules set for autoloop"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 178,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] no rules set for autolooper, please set rules using the setrule command\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 178,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "no rules set for autolooper, please set rules using the setrule command"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
142
cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json
vendored
Normal file
142
cmd/loop/testdata/sessions/liquidity/08_loop-setrule-success.json
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--incoming_threshold",
|
||||
"10",
|
||||
"034fa8802fdc9f8c137e8f2cce2e4d30e590a1314e16bd060ac7d772dc698ff4bc"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 130661787,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 3,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 124,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 124,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 130,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 130,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
60
cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json
vendored
Normal file
60
cmd/loop/testdata/sessions/liquidity/09_loop-suggestswaps-success.json
vendored
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"suggestswaps",
|
||||
"--network",
|
||||
"regtest"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 137916583,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SuggestSwaps",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SuggestSwapsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 137,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SuggestSwaps",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SuggestSwapsResponse",
|
||||
"payload": {
|
||||
"loop_out": [],
|
||||
"loop_in": [],
|
||||
"disqualified": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 137,
|
||||
"kind": "stdout",
|
||||
"data": {
|
||||
"lines": [
|
||||
"{\n",
|
||||
" \"disqualified\": [],\n",
|
||||
" \"loop_in\": [],\n",
|
||||
" \"loop_out\": []\n",
|
||||
"}\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 137,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
150
cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json
vendored
Normal file
150
cmd/loop/testdata/sessions/liquidity/10_loop-setrule-incoming.json
vendored
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--incoming_threshold",
|
||||
"40",
|
||||
"125344325763072"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 204743867,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 2,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 135,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 135,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "125344325763072",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 40,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 204,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 204,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
183
cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json
vendored
Normal file
183
cmd/loop/testdata/sessions/liquidity/11_loop-setrule-outgoing-type-in.json
vendored
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--type",
|
||||
"in",
|
||||
"--outgoing_threshold",
|
||||
"30",
|
||||
"124244814135296"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed",
|
||||
"duration": 212373344,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 2,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 168,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "125344325763072",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 40,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 168,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "125344325763072",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 40,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "124244814135296",
|
||||
"swap_type": "LOOP_IN",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 0,
|
||||
"outgoing_threshold": 30
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 212,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "error",
|
||||
"error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed",
|
||||
"status": {
|
||||
"code": 2,
|
||||
"message": "channel level rules not supported for loop in swaps, only peer-level rules allowed"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 212,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 212,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "rpc error: code = Unknown desc = channel level rules not supported for loop in swaps, only peer-level rules allowed"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
149
cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json
vendored
Normal file
149
cmd/loop/testdata/sessions/liquidity/12_loop-setrule-clear.json
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--clear",
|
||||
"125344325763072"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 232507711,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 150,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "125344325763072",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 40,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 150,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 231,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 232,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
189
cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json
vendored
Normal file
189
cmd/loop/testdata/sessions/liquidity/13_loop-setparams-many-flags-error.json
vendored
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--maxswapfee",
|
||||
"0.1",
|
||||
"--maxroutingfee",
|
||||
"0.1",
|
||||
"--maxprepayfee",
|
||||
"0.1",
|
||||
"--maxprepay",
|
||||
"1000",
|
||||
"--maxminer",
|
||||
"1000",
|
||||
"--sweepconf",
|
||||
"10",
|
||||
"--failurebackoff",
|
||||
"60",
|
||||
"--autoloop",
|
||||
"--autobudget",
|
||||
"1000",
|
||||
"--autobudgetrefreshperiod",
|
||||
"1h",
|
||||
"--autoinflight",
|
||||
"2",
|
||||
"--minamt",
|
||||
"1000",
|
||||
"--maxamt",
|
||||
"200000",
|
||||
"--htlc_conf",
|
||||
"2",
|
||||
"--easyautoloop",
|
||||
"--localbalancesat",
|
||||
"1000000",
|
||||
"--easyautoloop_excludepeer",
|
||||
"0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7",
|
||||
"--fast"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte",
|
||||
"duration": 325173938,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 3,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 276,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 276,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "1000",
|
||||
"max_swap_amount": "200000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 324,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "error",
|
||||
"error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte",
|
||||
"status": {
|
||||
"code": 2,
|
||||
"message": "sweep fee rate limit must be > 1 sat/vByte"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 325,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 325,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "rpc error: code = Unknown desc = sweep fee rate limit must be > 1 sat/vByte"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
191
cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json
vendored
Normal file
191
cmd/loop/testdata/sessions/liquidity/14_loop-setparams-many-flags-error-minamt.json
vendored
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--sweeplimit",
|
||||
"2",
|
||||
"--maxswapfee",
|
||||
"0.1",
|
||||
"--maxroutingfee",
|
||||
"0.1",
|
||||
"--maxprepayfee",
|
||||
"0.1",
|
||||
"--maxprepay",
|
||||
"1000",
|
||||
"--maxminer",
|
||||
"1000",
|
||||
"--sweepconf",
|
||||
"10",
|
||||
"--failurebackoff",
|
||||
"60",
|
||||
"--autoloop",
|
||||
"--autobudget",
|
||||
"1000",
|
||||
"--autobudgetrefreshperiod",
|
||||
"1h",
|
||||
"--autoinflight",
|
||||
"2",
|
||||
"--minamt",
|
||||
"1000",
|
||||
"--maxamt",
|
||||
"200000",
|
||||
"--htlc_conf",
|
||||
"2",
|
||||
"--easyautoloop",
|
||||
"--localbalancesat",
|
||||
"1000000",
|
||||
"--easyautoloop_excludepeer",
|
||||
"0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7",
|
||||
"--fast"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"run_error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum",
|
||||
"duration": 273083406,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 191,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 191,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "1000",
|
||||
"max_swap_amount": "200000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 272,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "error",
|
||||
"error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum",
|
||||
"status": {
|
||||
"code": 2,
|
||||
"message": "minimum swap amount is less than server minimum"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 272,
|
||||
"kind": "stderr",
|
||||
"data": {
|
||||
"lines": [
|
||||
"[loop] rpc error: code = Unknown desc = minimum swap amount is less than server minimum\n"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 273,
|
||||
"kind": "exit",
|
||||
"data": {
|
||||
"run_error": "rpc error: code = Unknown desc = minimum swap amount is less than server minimum"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
176
cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json
vendored
Normal file
176
cmd/loop/testdata/sessions/liquidity/15_loop-setparams-many-flags.json
vendored
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--sweeplimit",
|
||||
"2",
|
||||
"--maxswapfee",
|
||||
"0.1",
|
||||
"--maxroutingfee",
|
||||
"0.1",
|
||||
"--maxprepayfee",
|
||||
"0.1",
|
||||
"--maxprepay",
|
||||
"1000",
|
||||
"--maxminer",
|
||||
"1000",
|
||||
"--sweepconf",
|
||||
"10",
|
||||
"--failurebackoff",
|
||||
"60",
|
||||
"--autoloop",
|
||||
"--autobudget",
|
||||
"1000",
|
||||
"--autobudgetrefreshperiod",
|
||||
"1h",
|
||||
"--autoinflight",
|
||||
"2",
|
||||
"--minamt",
|
||||
"500000",
|
||||
"--maxamt",
|
||||
"1000000",
|
||||
"--htlc_conf",
|
||||
"2",
|
||||
"--easyautoloop",
|
||||
"--localbalancesat",
|
||||
"1000000",
|
||||
"--easyautoloop_excludepeer",
|
||||
"0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7",
|
||||
"--fast"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 184771728,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 3,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 160,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "20000",
|
||||
"sweep_fee_rate_sat_per_vbyte": "0",
|
||||
"max_swap_fee_ppm": "0",
|
||||
"max_routing_fee_ppm": "0",
|
||||
"max_prepay_routing_fee_ppm": "0",
|
||||
"max_prepay_sat": "0",
|
||||
"max_miner_fee_sat": "0",
|
||||
"sweep_conf_target": 100,
|
||||
"failure_backoff_sec": "86400",
|
||||
"autoloop": false,
|
||||
"autoloop_budget_sat": "335544",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "1",
|
||||
"min_swap_amount": "0",
|
||||
"max_swap_amount": "0",
|
||||
"htlc_conf_target": 6,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "604800",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": false,
|
||||
"easy_autoloop_local_target_sat": "0",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 161,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 182,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 184,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
145
cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json
vendored
Normal file
145
cmd/loop/testdata/sessions/liquidity/16_loop-setparams-destaddr.json
vendored
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--destaddr",
|
||||
"bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 235471909,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 2,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 223,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 224,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 234,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 235,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
147
cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json
vendored
Normal file
147
cmd/loop/testdata/sessions/liquidity/17_loop-setparams-account.json
vendored
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--account",
|
||||
"default",
|
||||
"--account_addr_type",
|
||||
"p2tr"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 264493138,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 1,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 249,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "bcrt1pfu9g59aqtxd39653f76y4c8z7r3t9tmcvrvhl57a3dgj3epdwxdqcd9fpw",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "",
|
||||
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 250,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "default",
|
||||
"account_addr_type": "TAPROOT_PUBKEY",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 264,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 264,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
142
cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json
vendored
Normal file
142
cmd/loop/testdata/sessions/liquidity/18_loop-setparams-includeallpeers.json
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setparams",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--easyatutoloop_includeallpeers"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 304215261,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 2,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 263,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "default",
|
||||
"account_addr_type": "TAPROOT_PUBKEY",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": [
|
||||
"AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 271,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770076824",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "default",
|
||||
"account_addr_type": "TAPROOT_PUBKEY",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 303,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 304,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
152
cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json
vendored
Normal file
152
cmd/loop/testdata/sessions/liquidity/19_loop-setrule-type-out.json
vendored
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
"metadata": {
|
||||
"args": [
|
||||
"/home/user/bin/loop",
|
||||
"setrule",
|
||||
"--network",
|
||||
"regtest",
|
||||
"--type",
|
||||
"out",
|
||||
"--incoming_threshold",
|
||||
"20",
|
||||
"125344325763072"
|
||||
],
|
||||
"env": {
|
||||
"HOME": "/home/user"
|
||||
},
|
||||
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
|
||||
"duration": 195037901,
|
||||
"clock_start_unix": 1769407086
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"time_ms": 3,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.GetLiquidityParamsRequest",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 137,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/GetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.LiquidityParameters",
|
||||
"payload": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770092424",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "default",
|
||||
"account_addr_type": "TAPROOT_PUBKEY",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 137,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "request",
|
||||
"message_type": "looprpc.SetLiquidityParamsRequest",
|
||||
"payload": {
|
||||
"parameters": {
|
||||
"rules": [
|
||||
{
|
||||
"channel_id": "0",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "A0+ogC/cn4wTfo8szi5NMOWQoTFOFr0GCsfXctxpj/S8",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 10,
|
||||
"outgoing_threshold": 0
|
||||
},
|
||||
{
|
||||
"channel_id": "125344325763072",
|
||||
"swap_type": "LOOP_OUT",
|
||||
"pubkey": "",
|
||||
"type": "THRESHOLD",
|
||||
"incoming_threshold": 20,
|
||||
"outgoing_threshold": 0
|
||||
}
|
||||
],
|
||||
"fee_ppm": "0",
|
||||
"sweep_fee_rate_sat_per_vbyte": "2",
|
||||
"max_swap_fee_ppm": "1000",
|
||||
"max_routing_fee_ppm": "1000",
|
||||
"max_prepay_routing_fee_ppm": "1000",
|
||||
"max_prepay_sat": "1000",
|
||||
"max_miner_fee_sat": "1000",
|
||||
"sweep_conf_target": 10,
|
||||
"failure_backoff_sec": "60",
|
||||
"autoloop": true,
|
||||
"autoloop_budget_sat": "1000",
|
||||
"autoloop_budget_start_sec": "0",
|
||||
"auto_max_in_flight": "2",
|
||||
"min_swap_amount": "500000",
|
||||
"max_swap_amount": "1000000",
|
||||
"htlc_conf_target": 2,
|
||||
"autoloop_dest_address": "",
|
||||
"autoloop_budget_refresh_period_sec": "3600",
|
||||
"autoloop_budget_last_refresh": "1770092424",
|
||||
"easy_autoloop": true,
|
||||
"easy_autoloop_local_target_sat": "1000000",
|
||||
"account": "default",
|
||||
"account_addr_type": "TAPROOT_PUBKEY",
|
||||
"easy_asset_params": {},
|
||||
"fast_swap_publication": true,
|
||||
"easy_autoloop_excluded_peers": []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 194,
|
||||
"kind": "grpc",
|
||||
"data": {
|
||||
"method": "/looprpc.SwapClient/SetLiquidityParams",
|
||||
"event": "response",
|
||||
"message_type": "looprpc.SetLiquidityParamsResponse",
|
||||
"payload": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"time_ms": 195,
|
||||
"kind": "exit",
|
||||
"data": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue