lnhtlc: local update raw messages must not be deleted before acked
In recv_rev() previously all unacked_local_updates were deleted as it was assumed that all of them have been acked at that point by the revoke_and_ack itself. However this is not necessarily the case: see new test case. renamed log['unacked_local_updates'] to log['unacked_local_updates2'] to avoid breaking existing wallet files
This commit is contained in:
@@ -88,7 +88,7 @@ def create_ephemeral_key() -> (bytes, bytes):
|
||||
|
||||
class LNTransportBase:
|
||||
|
||||
def send_bytes(self, msg):
|
||||
def send_bytes(self, msg: bytes) -> None:
|
||||
l = len(msg).to_bytes(2, 'big')
|
||||
lc = aead_encrypt(self.sk, self.sn(), b'', l)
|
||||
c = aead_encrypt(self.sk, self.sn(), b'', msg)
|
||||
|
||||
Reference in New Issue
Block a user