diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-26 20:43:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-26 20:43:08 +0200 |
commit | 9a5030b993d74732f8fba2879cfca03ec070ad9a (patch) | |
tree | 7e47603cacc59d6c339484acdffb9aa0726da7f9 /src/exchange/taler-exchange-httpd_keystate.c | |
parent | 35fe98a1657086af959e4512bb79b04e81ed3fc1 (diff) | |
download | exchange-9a5030b993d74732f8fba2879cfca03ec070ad9a.tar.gz exchange-9a5030b993d74732f8fba2879cfca03ec070ad9a.tar.bz2 exchange-9a5030b993d74732f8fba2879cfca03ec070ad9a.zip |
add test for json_wire.c logic
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keystate.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_keystate.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_keystate.c b/src/exchange/taler-exchange-httpd_keystate.c index c4e550210..24eef36ea 100644 --- a/src/exchange/taler-exchange-httpd_keystate.c +++ b/src/exchange/taler-exchange-httpd_keystate.c @@ -104,6 +104,46 @@ struct DenominationKeyEntry */ struct GNUNET_HashCode denom_key_hash; +#ifdef OPTIMIZE_5777_AUDITOR_BY_COUNT_REALTIME_DETECTION + + /** + * Mutex that must be held before threads may access or update + * @e known_coin_counter or @e known_coin_counter_db. + */ + pthread_mutex_t known_coin_counter_mutex; + + /** + * Mutex that must be held before threads may access or update + * @e issued_coin_counter or @e issued_coin_counter_db. + */ + pthread_mutex_t issued_coin_counter_mutex; + + /** + * How many coins of this denomination have been redeemed so far (according + * to only this process)? + */ + uint64_t known_coin_counter; + + /** + * How many coins of this denomination have been redeemed so far (based on + * the last time we synchronized the value with our database). + */ + uint64_t known_coin_counter_db; + + /** + * How many coins of this denomination have been issued so far (according + * to only this process)? + */ + uint64_t issued_coin_counter; + + /** + * How many coins of this denomination have been issued so far (based on the + * last time we synchronized the value with our database)? + */ + uint64_t issued_coin_counter_db; + +#endif + }; |