diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2022-10-03 11:07:31 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2022-10-03 11:07:31 +0200 |
commit | e1d6c8eb3e3d4ba1d6003b03560e7c50067edead (patch) | |
tree | d4a993270c3c2dd65d9a06a4c5237123dfe6a368 /test_brandt.c | |
parent | a423fdb1d0c05e743deaf4f0e2332ca376d4329d (diff) |
sort json keys; free string
Diffstat (limited to 'test_brandt.c')
-rw-r--r-- | test_brandt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test_brandt.c b/test_brandt.c index 0a25569..98ba06d 100644 --- a/test_brandt.c +++ b/test_brandt.c @@ -656,7 +656,7 @@ print_transcript (uint32_t highestprice) // Add signature of seller to H(auction, bidders, signatures, transscript, result) { struct GNUNET_CRYPTO_EddsaSignature sig; - char *root_js = json_dumps(root, JSON_COMPACT); + char *root_js = json_dumps(root, JSON_COMPACT|JSON_SORT_KEYS); GNUNET_CRYPTO_hash(root_js, strlen(root_js), @@ -673,6 +673,8 @@ print_transcript (uint32_t highestprice) root, "sig", GNUNET_JSON_from_data_auto(&sig))); + + free(root_js); } printf ("%s\n", json_dumps (root, JSON_INDENT (2))); |