aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-06-27 16:06:17 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-09-26 16:46:56 +0200
commitff893aa5574f5c422b72dd10b00eac805fc737e5 (patch)
treed56d3b4f0a6aa6042a0984d692facc32a8ea9baf /src/test
parent198494ce5323cafbf90a7b543d1b07355eb3db6c (diff)
downloadbitcoin-ff893aa5574f5c422b72dd10b00eac805fc737e5.tar.xz
Implement SipHash in Python
Github-Pull: #8418 Rebased-From: 9c8593d2b4e25ef628172ceadbedf0ef078d01ef
Diffstat (limited to 'src/test')
-rw-r--r--src/test/hash_tests.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp
index 82d61209b5..fa9624f13d 100644
--- a/src/test/hash_tests.cpp
+++ b/src/test/hash_tests.cpp
@@ -122,6 +122,10 @@ BOOST_AUTO_TEST_CASE(siphash)
hasher3.Write(uint64_t(x)|(uint64_t(x+1)<<8)|(uint64_t(x+2)<<16)|(uint64_t(x+3)<<24)|
(uint64_t(x+4)<<32)|(uint64_t(x+5)<<40)|(uint64_t(x+6)<<48)|(uint64_t(x+7)<<56));
}
+
+ CHashWriter ss(SER_DISK, CLIENT_VERSION);
+ ss << CTransaction();
+ BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL);
}
BOOST_AUTO_TEST_SUITE_END()