Skip to content

nodes: Use context to perform database queries

Patrick Steinhardt requested to merge pks-nodes-context into master

Database queries in the SQL elector currently don't use a context. While most are only executed via the monitor function which simply uses a background context which is never cancelled, some of the functions are directly or tranisively called from external contects. As a result, context cancellation would not stop any ongoing database queries.

This MR fixes the issue by passing in contexts to the electors. While at it, it also fixes an inaccurate comment.

Merge request reports

Loading