electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit dfcdcb8d6410958e8533817f81a6d17bdc463280
parent 0b183444b46e6bf26622e8b41368004a73357dee
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 20 Nov 2020 08:51:01 +0100

fix typo

Diffstat:
Melectrum/lnpeer.py | 2+-
Melectrum/lnutil.py | 4++--
Melectrum/tests/test_lnutil.py | 16++++++++--------
3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py @@ -227,7 +227,7 @@ class Peer(Logger): their_globalfeatures = int.from_bytes(payload['globalfeatures'], byteorder="big") self.their_features |= their_globalfeatures # check transitive dependencies for received features - if not self.their_features.validate_transitive_dependecies(): + if not self.their_features.validate_transitive_dependencies(): raise GracefulDisconnect("remote did not set all dependencies for the features they sent") # check if features are compatible, and set self.features to what we negotiated try: diff --git a/electrum/lnutil.py b/electrum/lnutil.py @@ -963,7 +963,7 @@ class LnFeatures(IntFlag): _ln_feature_contexts[OPTION_SUPPORT_LARGE_CHANNEL_OPT] = (LNFC.INIT | LNFC.NODE_ANN | LNFC.CHAN_ANN_ALWAYS_EVEN) _ln_feature_contexts[OPTION_SUPPORT_LARGE_CHANNEL_REQ] = (LNFC.INIT | LNFC.NODE_ANN | LNFC.CHAN_ANN_ALWAYS_EVEN) - def validate_transitive_dependecies(self) -> bool: + def validate_transitive_dependencies(self) -> bool: # for all even bit set, set corresponding odd bit: features = self # copy flags = list_enabled_bits(features) @@ -1087,7 +1087,7 @@ def validate_features(features: int) -> None: for fbit in enabled_features: if (1 << fbit) & LN_FEATURES_IMPLEMENTED == 0 and fbit % 2 == 0: raise UnknownEvenFeatureBits(fbit) - if not features.validate_transitive_dependecies(): + if not features.validate_transitive_dependencies(): raise IncompatibleOrInsaneFeatures(f"not all transitive dependencies are set. " f"features={features}") diff --git a/electrum/tests/test_lnutil.py b/electrum/tests/test_lnutil.py @@ -757,21 +757,21 @@ class TestLNUtil(ElectrumTestCase): extract_nodeid("00" * 33 + "@") self.assertEqual(extract_nodeid("00" * 33 + "@localhost"), (b"\x00" * 33, "localhost")) - def test_ln_features_validate_transitive_dependecies(self): + def test_ln_features_validate_transitive_dependencies(self): features = LnFeatures.OPTION_DATA_LOSS_PROTECT_REQ - self.assertTrue(features.validate_transitive_dependecies()) + self.assertTrue(features.validate_transitive_dependencies()) features = LnFeatures.PAYMENT_SECRET_OPT - self.assertFalse(features.validate_transitive_dependecies()) + self.assertFalse(features.validate_transitive_dependencies()) features = LnFeatures.PAYMENT_SECRET_REQ - self.assertFalse(features.validate_transitive_dependecies()) + self.assertFalse(features.validate_transitive_dependencies()) features = LnFeatures.PAYMENT_SECRET_REQ | LnFeatures.VAR_ONION_REQ - self.assertTrue(features.validate_transitive_dependecies()) + self.assertTrue(features.validate_transitive_dependencies()) features = LnFeatures.BASIC_MPP_OPT | LnFeatures.PAYMENT_SECRET_REQ - self.assertFalse(features.validate_transitive_dependecies()) + self.assertFalse(features.validate_transitive_dependencies()) features = LnFeatures.BASIC_MPP_OPT | LnFeatures.PAYMENT_SECRET_REQ | LnFeatures.VAR_ONION_OPT - self.assertTrue(features.validate_transitive_dependecies()) + self.assertTrue(features.validate_transitive_dependencies()) features = LnFeatures.BASIC_MPP_OPT | LnFeatures.PAYMENT_SECRET_REQ | LnFeatures.VAR_ONION_REQ - self.assertTrue(features.validate_transitive_dependecies()) + self.assertTrue(features.validate_transitive_dependencies()) def test_ln_features_for_init_message(self): features = LnFeatures.OPTION_DATA_LOSS_PROTECT_REQ