Skip to content

Commit

Permalink
update patch with str4d's upstream suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed Mar 4, 2024
1 parent f785f09 commit 8207534
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion depend/zcash/src/zcash/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BundleCacheHasher
{
static_assert(hash_select < 8, "BundleCacheHasher only has 8 hashes available.");
uint32_t u;
std::memcpy(&u, &*(key.begin() + 4 * hash_select), 4);
std::memcpy(&u, key.data() + 4 * hash_select, 4);
return u;
}
};
Expand Down
6 changes: 3 additions & 3 deletions zcash.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ index c5cd6b173c..1da334b377 100644
+++ b/depend/zcash/src/zcash/cache.cpp
@@ -3,7 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include "zcash/cache.h"
-#include "util/system.h"
+// #include "util/system.h"

namespace libzcash
{
@@ -11,8 +11,8 @@ std::unique_ptr<BundleValidityCache> NewBundleValidityCache(rust::Str kind, size
Expand All @@ -31,7 +31,7 @@ index 9bef1e43b5..283123bec9 100644
static_assert(hash_select < 8, "BundleCacheHasher only has 8 hashes available.");
uint32_t u;
- std::memcpy(&u, key.begin() + 4 * hash_select, 4);
+ std::memcpy(&u, &*(key.begin() + 4 * hash_select), 4);
+ std::memcpy(&u, key.data() + 4 * hash_select, 4);
return u;
}
};

0 comments on commit 8207534

Please sign in to comment.