Compare commits
No commits in common. "master" and "lash/man" have entirely different histories.
@ -46,7 +46,7 @@ class Config(confini.Config):
|
|||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_args(cls, args, arg_flags=0x0f, env=os.environ, extra_args={}, base_config_dir=None, default_config_dir=None, user_config_dir=None, default_fee_limit=None, logger=None, load_callback=None, dump_writer=sys.stdout):
|
def from_args(cls, args, arg_flags=0x0f, env=os.environ, extra_args={}, base_config_dir=None, default_config_dir=None, user_config_dir=None, default_fee_limit=None, logger=None, load_callback=logcallback, dump_writer=sys.stdout):
|
||||||
"""Parses arguments in argparse.ArgumentParser instance, then match and override configuration values that match them.
|
"""Parses arguments in argparse.ArgumentParser instance, then match and override configuration values that match them.
|
||||||
|
|
||||||
The method processes all known argument flags from chainlib.cli.Flag passed in the "args" argument.
|
The method processes all known argument flags from chainlib.cli.Flag passed in the "args" argument.
|
||||||
|
@ -102,8 +102,7 @@ class RPCConnection:
|
|||||||
}
|
}
|
||||||
__constructors_for_chains = {}
|
__constructors_for_chains = {}
|
||||||
|
|
||||||
def __init__(self, url=None, chain_spec=None, auth=None, verify_identity=True, timeout=1.0):
|
def __init__(self, url=None, chain_spec=None, auth=None, verify_identity=True):
|
||||||
self.timeout = timeout
|
|
||||||
self.chain_spec = chain_spec
|
self.chain_spec = chain_spec
|
||||||
self.location = None
|
self.location = None
|
||||||
self.basic = None
|
self.basic = None
|
||||||
@ -330,7 +329,6 @@ class JSONRPCHTTPConnection(HTTPConnection):
|
|||||||
req,
|
req,
|
||||||
data=data.encode('utf-8'),
|
data=data.encode('utf-8'),
|
||||||
context=ssl_ctx,
|
context=ssl_ctx,
|
||||||
timeout=self.timeout,
|
|
||||||
)
|
)
|
||||||
except URLError as e:
|
except URLError as e:
|
||||||
raise RPCException(e)
|
raise RPCException(e)
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# local imports
|
|
||||||
from .chain import ChainSpec
|
|
||||||
|
|
||||||
|
|
||||||
class ChainSettings:
|
|
||||||
|
|
||||||
def __init__(self, include_sync=False, include_queue=False):
|
|
||||||
self.o = {}
|
|
||||||
self.get = self.o.get
|
|
||||||
|
|
||||||
|
|
||||||
def process_common(self, config):
|
|
||||||
self.o['CHAIN_SPEC'] = ChainSpec.from_chain_str(config.get('CHAIN_SPEC'))
|
|
||||||
|
|
||||||
|
|
||||||
def process(self, config):
|
|
||||||
self.process_common(config)
|
|
||||||
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
ks = list(self.o.keys())
|
|
||||||
ks.sort()
|
|
||||||
s = ''
|
|
||||||
for k in ks:
|
|
||||||
s += '{}: {}\n'.format(k, self.o.get(k))
|
|
||||||
return s
|
|
@ -8,7 +8,7 @@ class Tx:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, src, block=None):
|
def __init__(self, src, block=None):
|
||||||
|
self.txs = []
|
||||||
self.src = src
|
self.src = src
|
||||||
self.block = block
|
self.block = block
|
||||||
self.block_src = None
|
self.block_src = None
|
||||||
self.index = None
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
funga~=0.5.2
|
funga~=0.5.2
|
||||||
pysha3==1.0.2
|
pysha3==1.0.2
|
||||||
hexathon~=0.1.5
|
hexathon~=0.1.5
|
||||||
confini~=0.6.0
|
confini~=0.5.7
|
||||||
|
@ -214,6 +214,7 @@ if examples != None:
|
|||||||
f.write(".SH EXAMPLES\n\n")
|
f.write(".SH EXAMPLES\n\n")
|
||||||
f.write(examples)
|
f.write(examples)
|
||||||
|
|
||||||
|
|
||||||
if seealso != None:
|
if seealso != None:
|
||||||
seealso_description = seealso
|
seealso_description = seealso
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ name=chainlib
|
|||||||
license=WTFPL2
|
license=WTFPL2
|
||||||
author_email=dev@holbrook.no
|
author_email=dev@holbrook.no
|
||||||
description=Generic blockchain access library and tooling
|
description=Generic blockchain access library and tooling
|
||||||
version=0.1.1
|
version=0.0.23
|
||||||
url=https://gitlab.com/chaintools/chainlib
|
url=https://gitlab.com/chaintools/chainlib
|
||||||
author=Louis Holbrook
|
author=Louis Holbrook
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user