lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.58k stars 178 forks source link

TX_MISSING_INPUTS is ambiguous #357

Open BrannonKing opened 4 years ago

BrannonKing commented 4 years ago

The TX_MISSING_INPUTS error makes it sound like the person creating the TX forgot to include inputs in that TX. However, the error is actually issued when the TX's inputs don't have corresponding TXOs in the history of the chain or if the TXOs have already been spent. We should clarify the message and consider breaking it into spent vs missing.

BrannonKing commented 4 years ago

Should the error state what TXIs were already spent? Or should there be a way to query via RPC for what was spent? Maybe the unspent Sqlite table is sufficient for that.