Lightning Network: what if one broadcast an old transaction? I understand that after a channel is created, A and B need to agree and sign to create a new transaction. The new transaction overrides the previous transaction. A or B could quit the channel by broadcasting the transaction onto Bitcoin network so that the transaction is final:

txn 0: A:0.5, B:0.5
txn 1: A:0.3, B:0.7
txn 2: A:0.9, B:0.1


A or B quit channel, broadcast txn 2, so A will have 0.9 and B will have 0.1

But what if B quit the channel, broadcasting txn 1 rather than txn 2 on to the Bitcoin network? Wouldn't the txn 1 becomes final and B could walk away with 0.7?
Apparently there is a time until which A can question the transaction because he will have proof for the later transaction that has happened. And B will lose all the money in the channel for broadcasting a previous transaction.