@@ -17,7 +17,7 @@ class SauronError(Exception):
17
17
pass
18
18
19
19
def fetch (url ):
20
- """Fetch this {url}, maybe through a pre-defined proxy."""
20
+ """Fetch the given {url}, maybe through a pre-defined proxy."""
21
21
# FIXME: Maybe try to be smart and renew circuit to broadcast different
22
22
# transactions ? Hint: lightningd will agressively send us the same
23
23
# transaction a certain amount of times.
@@ -79,6 +79,7 @@ def init(plugin, options, **kwargs):
79
79
def getchaininfo (plugin , ** kwargs ):
80
80
blockhash_url = "{}/block-height/0" .format (plugin .api_endpoint )
81
81
blockcount_url = "{}/blocks/tip/height" .format (plugin .api_endpoint )
82
+
82
83
chains = {
83
84
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" : "main" ,
84
85
"000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943" : "test" ,
@@ -117,7 +118,9 @@ def getchaininfo(plugin, **kwargs):
117
118
118
119
@plugin .method ("getrawblockbyheight" )
119
120
def getrawblock (plugin , height , ** kwargs ):
121
+ # Step 1: Get the block hash by height
120
122
blockhash_url = "{}/block-height/{}" .format (plugin .api_endpoint , height )
123
+
121
124
blockhash_req = fetch (blockhash_url )
122
125
if blockhash_req .status_code != 200 :
123
126
return {
@@ -278,6 +281,7 @@ def estimatefees(plugin, **kwargs):
278
281
{"blocks" : 144 , "feerate" : slow }
279
282
]
280
283
284
+ # Return the estimated fees
281
285
return {
282
286
"opening" : normal ,
283
287
"mutual_close" : normal ,
@@ -295,6 +299,7 @@ def estimatefees(plugin, **kwargs):
295
299
"sauron-api-endpoint" ,
296
300
"" ,
297
301
"The URL of the esplora instance to hit (including '/api')." ,
302
+ "The URL of the mutinynet instance to hit (including '/api')." ,
298
303
)
299
304
300
305
plugin .add_option (
0 commit comments