Bitcoin full node and query server

Nov 30, 2018

View in context in the libbitcoin Slack #general mirror.

James C.18:49
Hi @evoskuil, I am reading through the tx_database but have a couple questions: How is it used during transaction validation? — tx_database::get_output fetches any stored output, and queries an in-memory unspent_output cache first, but it doesn’t return whether the output is spent or not, does it? — Each tx output in the database can be marked with a spender_height, but I can’t find where that value is read anywhere. So tx_database::get_output seems to be optimised for unspent outputs, but I can’t see how it tells the caller whether the output is indeed spent/unspent. What call should I use for validating whether prevout is valid?
(edited)