There is currently a bug can be reproduced by repeatedly add tlcs from one party. It will trigger index out of bound panic. This is because we are using the wrong commitment number to obtain remote commitment point (which we have not kept in an array). This PR add the repro to the e2e test. Admittedly this is not enough, we need a "real" test to verify the created commitment transaction is valid (e.g. can be revoked when a revocation secret is revealed).
There is currently a bug can be reproduced by repeatedly add tlcs from one party. It will trigger index out of bound panic. This is because we are using the wrong commitment number to obtain remote commitment point (which we have not kept in an array). This PR add the repro to the e2e test. Admittedly this is not enough, we need a "real" test to verify the created commitment transaction is valid (e.g. can be revoked when a revocation secret is revealed).