Skip to content

Commit

Permalink
flake
Browse files Browse the repository at this point in the history
  • Loading branch information
accumulator committed May 17, 2024
1 parent 3f1ae3d commit 2475cc9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion electrum/lnonion.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def process_onion_packet(
onion_packet: OnionPacket,
our_onion_private_key: bytes,
*,
associated_data: bytes = bytes(),
associated_data: bytes = b'',
is_trampoline=False,
tlv_stream_name='payload') -> ProcessedOnionPacket:
if not ecc.ECPubkey.is_pubkey_bytes(onion_packet.public_key):
Expand Down
1 change: 1 addition & 0 deletions electrum/onion_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

if TYPE_CHECKING:
from electrum.lnworker import LNWallet
from electrum.network import Network

logger = get_logger(__name__)

Expand Down
9 changes: 8 additions & 1 deletion tests/test_bolt12.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,15 @@ def test_serde_complex_fields(self):
]}
}

with self.assertRaises(Exception):
# assertRaises on generic Exception used in lnmsg encode/write_tlv_stream makes flake8 complain
# so work around this for now (TODO: refactor lnmsg generic exceptions)
#with self.assertRaises(Exception):
try:
invreq_pl_tlv = encode_invoice_request(invreq, payer_key=payer_key)
except Exception as e:
pass
else:
raise Exception('Exception expected')

# test complex field count matches parameters
invreq = {
Expand Down

0 comments on commit 2475cc9

Please sign in to comment.