View Issue Details

IDProjectCategoryView StatusLast Update
0006187Talerexchangepublic2021-09-02 16:14
Reporteroec Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.7.1Fixed in Version0.7.1 
Summary0006187: Redundant copy of dki->issue.properties.fee_deposit
DescriptionIn exchange/taler-exchange-httpd_deposit.c:

 428 TALER_amount_ntoh (&deposit.deposit_fee,
 429 &dki->issue.properties.fee_deposit);
 430 if (GNUNET_YES !=
 431 TALER_amount_cmp_currency (&deposit.amount_with_fee,
 432 &deposit.deposit_fee) )
 ...
 455 TALER_amount_ntoh (&deposit.deposit_fee,
 456 &dki->issue.properties.fee_deposit);


The copies in line 428-429 and 455-456 are redundant.

For better readability I suggest to remove of the copy in 428-429 and compare directly against &dki->issue.properties.fee_deposit in 431-432.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-04-17 16:19

manager   ~0015680

The suggested fix doesn't work, as the cmp_currency function only works for the 'host byte order' version of 'account'. So we'd get a type error in that case. Anyway, I'll remove the redundant initialization in lines 455/456, nice catch.

Christian Grothoff

2020-04-17 16:20

manager   ~0015681

Fixed in 04d4922d..7a46b3fb

Christian Grothoff

2021-09-02 16:14

manager   ~0018264

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2020-04-17 14:42oecNew Issue
2020-04-17 14:42oecStatusnew => assigned
2020-04-17 14:42oecAssigned To => Christian Grothoff
2020-04-17 16:14Christian GrothoffSeverityminor => tweak
2020-04-17 16:14Christian GrothoffProduct Version => git (master)
2020-04-17 16:19Christian GrothoffNote Added: 0015680
2020-04-17 16:20Christian GrothoffStatusassigned => informing
2020-04-17 16:20Christian GrothoffResolutionopen => fixed
2020-04-17 16:20Christian GrothoffFixed in Version => 0.7.1
2020-04-17 16:20Christian GrothoffNote Added: 0015681
2020-04-17 16:20Christian GrothoffTarget Version => 0.7.1
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2021-09-02 16:13Christian Grothoff
2021-09-02 16:14Christian GrothoffNote Added: 0018264