Commit Graph

5 Commits

Author SHA1 Message Date
Conner Fromknecht
e3a6de1554
lncfg/workers: reduce default write pool workers to 8
Now that the write pool no longer executes blocking i/o operations, it
is safe to reduce this number considerably. The write pool now only
handles encoding and encryption of messages, making problem
computationally bound and thus dependent on available CPUs. The
descriptions of the workers configs is also updated to explain how users
should set these on their on machines.
2019-04-22 16:30:27 -07:00
Conner Fromknecht
5c8ba59790
lncfg/interface: define Validator iface + variadic Validate
This commit introduces the Validator interface, which
is intended to be implemented by any sub configs. It
specifies a Validate() error method that should fail
if a sub configuration contains any invalid or insane
parameters.

In addition, a package-level Validate method can be
used to check a variadic number of sub configs
implementing the Validator interface. This allows the
primary config struct to be extended via targeted
and/or specialized sub configs, and validate all of
them in sequence without bloating the main package
with the actual validation logic.
2019-04-01 16:33:50 -07:00
Conner Fromknecht
60467bef7b
lncfg/workers: bump default read/write workers from 16 -> 100
Bumps the default read and write handlers to be well
above the average number of peers a node has. Since
the worker counts specify only a maximum number of
concurrent read/write workers, it is expected that
the actual usage would converge to the requirements
of the node anyway. However, in preparation for a
major release, this is a conservative measure to
ensure that the default values aren't too low and
improve network instability.
2019-03-26 16:40:57 -07:00
Conner Fromknecht
d81ce61033
config: add sanity check to prevent non-negative worker counts 2019-03-13 20:32:52 -07:00
Conner Fromknecht
3f181b3c06
lncfg/workers: configurable read, write, and sig pool workers 2019-03-13 20:32:25 -07:00