aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2015-10-29 07:11:24 +0100
committerPieter Wuille <[email protected]>2015-11-13 18:15:20 +0100
commit114b5812f6283f2325fc31e186b26c6d76f9551a (patch)
tree6c04a7ee882b7d8a291bb9507ddd5cf17e23f704 /src/hash.h
parentMerge pull request #6983 (diff)
downloaddiscoin-114b5812f6283f2325fc31e186b26c6d76f9551a.tar.xz
discoin-114b5812f6283f2325fc31e186b26c6d76f9551a.zip
Prevector type
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
index 077155562..daa92a009 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -8,6 +8,7 @@
#include "crypto/ripemd160.h"
#include "crypto/sha256.h"
+#include "prevector.h"
#include "serialize.h"
#include "uint256.h"
#include "version.h"
@@ -118,6 +119,13 @@ inline uint160 Hash160(const std::vector<unsigned char>& vch)
return Hash160(vch.begin(), vch.end());
}
+/** Compute the 160-bit hash of a vector. */
+template<unsigned int N>
+inline uint160 Hash160(const prevector<N, unsigned char>& vch)
+{
+ return Hash160(vch.begin(), vch.end());
+}
+
/** A writer stream (for serialization) that computes a 256-bit hash. */
class CHashWriter
{