diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-07-04 22:41:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-07-04 22:41:05 +0200 |
commit | fbee6727758eec92dbb07bb9a4944d1174c16960 (patch) | |
tree | 5d374577b07c59d0ec8efefc1c7c3ec260b0a585 /src | |
parent | f8349a9cbfff85f2f688a686a9dfa3e3db80e8fc (diff) |
log warning if matching denomination key is out of range
Diffstat (limited to 'src')
-rw-r--r-- | src/mint-lib/test_mint_api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mint-lib/test_mint_api.c b/src/mint-lib/test_mint_api.c index 69de6b7e3..568acab09 100644 --- a/src/mint-lib/test_mint_api.c +++ b/src/mint-lib/test_mint_api.c @@ -424,6 +424,15 @@ find_pk (const struct TALER_MINT_Keys *keys, (now.abs_value_us >= pk->valid_from.abs_value_us) && (now.abs_value_us < pk->withdraw_valid_until.abs_value_us) ) return pk; + if ( (0 == TALER_amount_cmp (amount, + &pk->value)) && + ( (now.abs_value_us < pk->valid_from.abs_value_us) || + (now.abs_value_us > pk->withdraw_valid_until.abs_value_us) ) ) + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Have a matching denomination key, but with wrong expiration range %llu vs [%llu,%llu)\n", + now.abs_value_us, + pk->valid_from.abs_value_us, + pk->withdraw_valid_until.abs_value_us); } str = TALER_amount_to_string (amount); GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |