towards more expirations
authorSchanzenbach, Martin <mschanzenbach@posteo.de>
Sat, 18 Apr 2020 19:14:03 +0000 (21:14 +0200)
committerSchanzenbach, Martin <mschanzenbach@posteo.de>
Sat, 18 Apr 2020 19:14:03 +0000 (21:14 +0200)
src/revocation/revocation.h
src/revocation/revocation_api.c

index 184f58e0a701c05ed6f350bc7c7513c9e0c935af..d7b9cc139bfc46a0e5927cee1e0a43f8389e65e0 100644 (file)
@@ -89,14 +89,14 @@ struct RevokeMessage
   uint32_t reserved GNUNET_PACKED;
 
   /**
-   * Timestamp
+   * Number that causes a hash collision with the @e public_key.
    */
-  struct GNUNET_TIME_AbsoluteNBO ts;
+  uint64_t proof_of_work GNUNET_PACKED;
 
   /**
-   * Number that causes a hash collision with the @e public_key.
+   * Timestamp
    */
-  uint64_t proof_of_work GNUNET_PACKED;
+  struct GNUNET_TIME_AbsoluteNBO ts;
 
   /**
    * Signature confirming revocation.
index c2aafd25448b950dd7f557c62a4845a1d4f17afb..c9bb2543a2615645fd8b0b3fa853fd0ca5b9f4ef 100644 (file)
@@ -368,13 +368,13 @@ GNUNET_REVOCATION_check_pow (const struct GNUNET_CRYPTO_EcdsaPublicKey *key,
 
   ts_nbo = GNUNET_TIME_absolute_hton (*ts);
 
-  GNUNET_memcpy (buf, &pow, sizeof(pow)) ;
-  GNUNET_memcpy (&buf[sizeof(pow)], key,
-                 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey));
-  GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)],
+  GNUNET_memcpy (buf, &pow, sizeof(pow));
+  GNUNET_memcpy (&buf[sizeof(pow)],
                  &ts_nbo,
                  sizeof (struct GNUNET_TIME_AbsoluteNBO));
-
+  GNUNET_memcpy (&buf[sizeof(pow) + sizeof (struct GNUNET_TIME_AbsoluteNBO)],
+                 key,
+                 sizeof(struct GNUNET_CRYPTO_EcdsaPublicKey));
   GNUNET_CRYPTO_pow_hash ("gnunet-revocation-proof-of-work",
                           buf,
                           sizeof(buf),