aboutsummaryrefslogtreecommitdiff
path: root/src/test/sighash_tests.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-06-26 14:41:53 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-07-09 09:42:19 +0200
commit6354935c485d116e1965567561c197ab3fbc0e11 (patch)
tree9dc218c1ed2fad513df1cf309f5ecd271069067a /src/test/sighash_tests.cpp
parent001a53d7427dcbcceef3c6754d9cca19df6dafa1 (diff)
move rand functions from util to new random.h/.cpp
Diffstat (limited to 'src/test/sighash_tests.cpp')
-rw-r--r--src/test/sighash_tests.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 423ae4a789..b99797fccb 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -2,15 +2,16 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <boost/test/unit_test.hpp>
-#include <iostream>
-
+#include "data/sighash.json.h"
#include "main.h"
-#include "util.h"
+#include "random.h"
#include "serialize.h"
+#include "util.h"
#include "version.h"
-#include "data/sighash.json.h"
+#include <iostream>
+
+#include <boost/test/unit_test.hpp>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_utils.h"
#include "json/json_spirit_writer_template.h"
@@ -118,7 +119,7 @@ BOOST_AUTO_TEST_SUITE(sighash_tests)
BOOST_AUTO_TEST_CASE(sighash_test)
{
seed_insecure_rand(false);
-
+
#if defined(PRINT_SIGHASH_JSON)
std::cout << "[\n";
std::cout << "\t[\"raw_transaction, script, input_index, hashType, signature_hash (result)\"],\n";
@@ -205,10 +206,9 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
BOOST_ERROR("Bad test, couldn't deserialize data: " << strTest);
continue;
}
-
+
sh = SignatureHash(scriptCode, tx, nIn, nHashType);
BOOST_CHECK_MESSAGE(sh.GetHex() == sigHashHex, strTest);
}
}
BOOST_AUTO_TEST_SUITE_END()
-