Commit Graph

11 Commits

Author SHA1 Message Date
031d7b1d55 lnwire: extend RawFeatureVector with helper methods 2021-08-30 19:17:31 -07:00
baeceb2a0b lnwire: add new RequiresFeature method
In this commit, we add a new RequiresFeature method to the feature
vector struct. This method allows us to check if the set of features
we're examining *require* that the even portion of a bit pair be set.
This can be used to check if new behavior should be allowed (after we
flip new bits to be required) for existing contexts.
2020-11-25 16:31:56 -08:00
a168f37b9c lnwire+rpcserver: populate feature bits on decodepayreq 2019-12-10 13:09:36 -08:00
f34239889b lnwire/feature: remove feature bit number from name
The number and the name will be separate on the rpc level, so we remove
the feature bit from the string. Currently this method is unused apart
from maybe in some rare logging instances.
2019-12-10 13:08:59 -08:00
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
1633ab180f lnwire: New API for feature vectors.
This is a rewrite of feature vectors in lnwire. This has a few
benefits:

1) a simpler interface
2) separate structs for a plain set of feature bits and a feature
vector with associated feature names
their respective feature sets
3) loosened requirements that bits MUST be assigned in pairs
4) fix endianness of encoding/decoding
2017-10-17 22:47:20 -07:00
1be4d67ce4 multi: run all test instances in parallel 2017-06-17 01:00:07 +02:00
e3686cbc69 lnwire: replace all wire msg tests with a single property-based test
This commit does away with all the old manual message equality tests
and replace it with a single property-based test that uses the
testing/quick package. This test uses a single scenario which MUST hold
for all the messages type and all possible messages generated for those
types. As a result we are able to do away with all the prior manually
generated test data as the fuzzer to scan the input space looking for a
message that violates the scenario.
2017-04-19 16:17:00 -07:00
3a647869b6 lnwire: fix features_test.go to not reference removed .String() method 2017-02-22 16:01:42 -08:00
ae15a193e2 lnwire+features: transition to the user friendly list of features 2017-02-21 01:25:05 -08:00
3dd619fb35 lnwire: Add BOLT#1 'init' message
'init' message is the first message reveals the features supported or required
by this node. Nodes wait for receipt of the other's features to simplify error
diagnosis where features are incompatible. This message will help negotioate the
the features which are supported by both sides.
2017-02-17 13:27:29 +08:00