Discovered while adding more assertions in the litd custom channel itests.
This commit fixes two things:
Because we could have multiple assets with the same script key, but in different anchor transactions, we also need to include the anchor outpoint of the input we want to mark as spent. Otherwise a duplicate script key (e.g. a second TAP channel funding script key, which is identical for every channel as it's just OP_TRUE) couldn't be set as spent anymore.
Remove the TODO and LIMIT 1 workaround, since we now have a proper unique index preventing duplicate script keys WITHIN THE SAME ANCHOR OUTPUT.
Discovered while adding more assertions in the
litd
custom channel itests.This commit fixes two things: