lnworker: fix type error re pending_payments, and impl malformed htlcs
In old code, in lnpeer.htlc_switch(), "error" in lnworker.pending_payments had incorrect type. TODO: we need tests for payment failures...
This commit is contained in:
@@ -619,7 +619,7 @@ class TestAvailableToSpend(ElectrumTestCase):
|
||||
bob_idx = bob_channel.receive_htlc(htlc_dict).htlc_id
|
||||
force_state_transition(alice_channel, bob_channel)
|
||||
bob_channel.fail_htlc(bob_idx)
|
||||
alice_channel.receive_fail_htlc(alice_idx, None)
|
||||
alice_channel.receive_fail_htlc(alice_idx, error_bytes=None)
|
||||
# Alice now has gotten all her original balance (5 BTC) back, however,
|
||||
# adding a new HTLC at this point SHOULD fail, since if she adds the
|
||||
# HTLC and signs the next state, Bob cannot assume she received the
|
||||
|
||||
Reference in New Issue
Block a user