View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006214 | Taler | exchange | public | 2020-04-23 11:34 | 2021-08-24 16:23 |
Reporter | oec | Assigned To | Christian Grothoff | ||
Priority | low | Severity | tweak | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.7.1 | Fixed in Version | 0.7.1 | ||
Summary | 0006214: Suggestion: Introduce invariants check when dealing with TALER_EXCHANGEDB_TransactionList | ||||
Description | TEH_plugin->get_coin_transactions creates a linked list of TALER_EXCHANGEDB_TransactionList and TALER_EXCHANGEDB_calculate_transaction_list_totals iterates of such a list. AFAIK, if there is no element of type TALER_EXCHANGEDB_TT_DEPOSIT in the linked list, it must be the empty list, correct? I suggest to have additional GNUNET_assert statements in get_coin_transactions and maybe also in TALER_EXCHANGEDB_calculate_transaction_list_totals that check for those types of invariants. This would allow to catch inconsistencies in the database or bugs in the code early. | ||||
Tags | No tags attached. | ||||
|
IMO we should not assert on information we get from our database, databases can be corrupt and we should ideally survive that. At least if the (SQL) constraints / schema of the DB hold, and we cannot formulate a sane constraint that says that there has to be a deposit. We could possibly "GNUNET_break()" on this. |
|
Yes, GNUNET_break() would already be helpful. It would at least communicate to a developer or code auditor the presence of such an invariant. |
|
Added in a039bf4d..727eccbe (in both functions). |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-23 11:34 | oec | New Issue | |
2020-04-23 11:34 | oec | Status | new => assigned |
2020-04-23 11:34 | oec | Assigned To | => Christian Grothoff |
2020-04-23 11:38 | Christian Grothoff | Note Added: 0015752 | |
2020-04-23 11:44 | oec | Note Added: 0015753 | |
2020-04-23 12:00 | Christian Grothoff | Note Added: 0015755 | |
2020-04-23 12:00 | Christian Grothoff | Status | assigned => resolved |
2020-04-23 12:00 | Christian Grothoff | Resolution | open => fixed |
2020-04-23 12:00 | Christian Grothoff | Fixed in Version | => 0.7.1 |
2020-04-23 12:00 | Christian Grothoff | Product Version | => git (master) |
2020-04-23 12:00 | Christian Grothoff | Target Version | => 0.7.1 |
2021-08-24 16:23 | Christian Grothoff | Status | resolved => closed |