URI: 
       tadd config variable to test update_fail_malformed_htlc - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit ab188ff375d808f096c3596026be2769d818a9f0
   DIR parent 8ba7e6806428a90ffe01293e2b0b8bd340d07c6b
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Mon,  4 May 2020 20:31:36 +0200
       
       add config variable to test update_fail_malformed_htlc
       
       Diffstat:
         M electrum/lnpeer.py                  |       1 +
         M electrum/tests/regtest/regtest.sh   |       1 +
       
       2 files changed, 2 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py
       t@@ -1495,6 +1495,7 @@ class Peer(Logger):
                            onion_packet_bytes = bytes.fromhex(onion_packet_hex)
                            onion_packet = None
                            try:
       +                        if self.network.config.get('test_fail_malformed_htlc'): raise InvalidOnionPubkey()
                                onion_packet = OnionPacket.from_bytes(onion_packet_bytes)
                                processed_onion = process_onion_packet(onion_packet, associated_data=payment_hash, our_onion_private_key=self.privkey)
                            except UnsupportedOnionPacketVersion:
   DIR diff --git a/electrum/tests/regtest/regtest.sh b/electrum/tests/regtest/regtest.sh
       t@@ -104,6 +104,7 @@ fi
        
        if [[ $1 == "configure_test_forwarding" ]]; then
            $bob setconfig --offline lightning_forward_payments true
       +    # $carol setconfig --offline test_fail_malformed_htlc true # uncomment to test update_fail_malformed_htlc
        fi
        
        if [[ $1 == "open" ]]; then