From 7ffc6d0fb94592270a6a85f2dc8db9ec833d3565 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 16 Feb 2018 11:59:32 +0100 Subject: hash code trait --- src/include/taler_testing_lib.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/include/taler_testing_lib.h') diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index f7af8331..34f3217f 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1332,4 +1332,30 @@ TALER_TESTING_make_trait_amount_obj ( const struct TALER_Amount *amount); +/** + * Obtain a hash code from @a cmd. + * + * @param cmd command to extract trait from + * @param index which hash code to pick if @a cmd has multiple on + * offer + * @param wtid[out] set to the wanted hash code. + * @return #GNUNET_OK on success + */ +int +TALER_TESTING_get_trait_hash + (const struct TALER_TESTING_Command *cmd, + unsigned int index, + struct GNUNET_HashCode **hash); + +/** + * @param index associate the hash code with this index + * @param hash which hash code should be returned + * + * @return the trait, to be put in the traits array of the command + */ +struct TALER_TESTING_Trait +TALER_TESTING_make_trait_hash + (unsigned int index, + struct GNUNET_HashCode *hash); + #endif -- cgit v1.2.3