-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Expected Behavior
Current HTLC lock and claim tests do not represent a valid example of how a these two transactions should be built. There's also a lack of documentation in htlc_claim.py.
When serializing a transaction with invalid data (eg. unlock_secret) user should get an idea what's he doing wrong.
Current Behavior
Using tests as a basis point to try to learn how to construct an HTLC lock and claim transaction is not valid and will not provide you with a usable HTLC lock and claim transactions.
There's not enough information (eg. docs or errors) available what format or length the unlock_secret should be when passing it to the HtlcLock transaction builder which makes it difficult for user to deduce what he's doing wrong.
Possible Solution
Write tests and documentation that give a realistic example of how to construct a secret_hash and what actually unlock_secret is.
Throw an error if unlock_secret is not in a valid format when serializing the transaction.