mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-18 22:54:23 +01:00
Includes getbestblockhash so it can simulate db loads
This commit is contained in:
@@ -55,6 +55,8 @@ def process_request():
|
|||||||
getblockhash: a block hash is only queried by pisad on bootstrapping to check the network bitcoind is
|
getblockhash: a block hash is only queried by pisad on bootstrapping to check the network bitcoind is
|
||||||
running on.
|
running on.
|
||||||
|
|
||||||
|
getbestblockhash: returns the hash of the block in the tip of the chain
|
||||||
|
|
||||||
help: help is only used as a sample command to test if bitcoind is running when bootstrapping
|
help: help is only used as a sample command to test if bitcoind is running when bootstrapping
|
||||||
pisad. It will return a 200/OK with no data.
|
pisad. It will return a 200/OK with no data.
|
||||||
"""
|
"""
|
||||||
@@ -153,6 +155,9 @@ def process_request():
|
|||||||
response["error"] = no_param_err
|
response["error"] = no_param_err
|
||||||
response["error"]["message"] = response["error"]["message"].format("integer")
|
response["error"]["message"] = response["error"]["message"].format("integer")
|
||||||
|
|
||||||
|
elif method == "getbestblockhash":
|
||||||
|
response["result"] = blockchain[-1]
|
||||||
|
|
||||||
elif method == "help":
|
elif method == "help":
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user