mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 14:14:22 +01:00
Improves the simulator and adds some tests
The simulator now return the proper error messages when incorrect data is pased on RPC calls. Functionality for forks is missing.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import re
|
||||
from pisa.utils.authproxy import JSONRPCException
|
||||
from pisa.rpc_errors import RPC_INVALID_ADDRESS_OR_KEY
|
||||
from http.client import HTTPException
|
||||
@@ -55,3 +56,7 @@ def in_correct_network(bitcoin_cli, network):
|
||||
|
||||
return correct_network
|
||||
|
||||
|
||||
def check_txid_format(txid):
|
||||
# TODO: #12-check-txid-regexp
|
||||
return isinstance(txid, str) and re.search(r'^[0-9A-Fa-f]{64}$', txid) is not None
|
||||
|
||||
Reference in New Issue
Block a user