View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008087 | Taler | exchange | public | 2024-01-15 13:38 | 2024-03-07 20:47 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | low | Severity | trivial | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.9.4 | Fixed in Version | 0.9.4 | ||
Summary | 0008087: auditor_cb: dead store dki? | ||||
Description | This is in exchange/src/lib/exchange_api_batch_deposit.c: 259 const struct TALER_EXCHANGE_DenomPublicKey *dki; 287 dki = TALER_EXCHANGE_get_denomination_key_by_hash (dh->keys, 288 &dh->cdds[coin].h_denom_pub); 289 GNUNET_assert (NULL != dki); TALER_EXCHANGE_get_denomination_key_by_hash does a lookup, both arguments are const*. The return value is not used outside the assert. I'm assuming we do this here to make sure that the denomination key exists, but to a casual reader it looks like a dead store that could as well be removed from the code. As I understand the code, this is running in the exchange, not the auditor. That begs the question whether there could even be a record here where this condition fails. What are we guarding against? Ourselves? Is this a defense in depth "catch a can't happen error" style statement? | ||||
Tags | No tags attached. | ||||
|
This code is NOT running within the exchange! The exchange API is used by the merchant (and theoretically wallets written in C), so it is run by "exchange customers". After all, you're doing the merchant audit, and this is basically the key dependency. Anyway, it is a redundant check (we do the same one now in a for loop later!) that was left-over from before this was a *batch* version with a loop. Removing. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-01-15 13:38 | fefe | New Issue | |
2024-01-15 13:38 | fefe | Status | new => assigned |
2024-01-15 13:38 | fefe | Assigned To | => Christian Grothoff |
2024-01-15 13:43 | Christian Grothoff | Note Added: 0020874 | |
2024-01-15 13:45 | Christian Grothoff | Status | assigned => resolved |
2024-01-15 13:45 | Christian Grothoff | Resolution | open => fixed |
2024-01-15 13:45 | Christian Grothoff | Fixed in Version | => 0.9.4 |
2024-01-15 13:45 | Christian Grothoff | Product Version | => git (master) |
2024-01-15 13:45 | Christian Grothoff | Target Version | => 0.9.4 |
2024-03-07 20:47 | Christian Grothoff | Status | resolved => closed |