ic icon indicating copy to clipboard operation
ic copied to clipboard

fix(ckbtc): improve error handling in new KYT canister

Open ninegua opened this issue 1 year ago • 0 comments

Some valid bitcoin transactions may have output scripts that do not translate to any valid addresses. They are also not the inputs of other transactions.

The correct handling is to ignore such outputs when computing output addresses, and set them to None instead. This avoids throwing an error when we shouldn't be.

Also add a new test case to ensure correct handling if we do encounter an real error, i.e. when such output becomes the input of a transaction, which certainly would indicate corrupted block data, and in theory should never happen.

ninegua avatar Oct 25 '24 13:10 ninegua