fix init before use in new refund logic

This commit is contained in:
Christian Grothoff 2016-05-20 15:52:40 +02:00
parent 35509528bc
commit e39beff272
3 changed files with 4 additions and 3 deletions

View File

@ -512,6 +512,7 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl)
TALER_amount_hton (&rr.refund_fee,
&refund->refund_fee);
/* internal sanity check before we hand out a bogus sig... */
sig = &refund->merchant_sig.eddsa_sig;
if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_REFUND,
&rr.purpose,
@ -522,7 +523,6 @@ compile_transaction_history (const struct TALER_EXCHANGEDB_TransactionList *tl)
json_decref (history);
return NULL;
}
sig = &refund->merchant_sig.eddsa_sig;
details = GNUNET_JSON_from_data (&rr.purpose,
sizeof (struct TALER_RefundRequestPS));
}

View File

@ -983,7 +983,8 @@ postgres_prepare (PGconn *db_conn)
" WHERE"
" tiny=false AND"
" done=false AND"
" wire_deadline<$1"
" wire_deadline<=$1 AND"
" refund_deadline<$1"
" ORDER BY wire_deadline ASC"
" LIMIT 1",
1, NULL);

View File

@ -1017,7 +1017,7 @@ struct TALER_EXCHANGEDB_Plugin
/**
* Obtain information about deposits that are ready to be executed.
* Such deposits must not be marked as "tiny" or "done", and the
* execution time must be in the past.
* execution time and refund deadlines must both be in the past.
*
* @param cls the @e cls of this struct with the plugin-specific state
* @param session connection to the database