Update merkle tree and pedersen hash tests to account for new encoding
This commit is contained in:
@@ -261,7 +261,7 @@ TEST(merkletree, EmptyrootSapling) {
|
||||
// This literal is the depth-20 empty tree root with the bytes reversed to
|
||||
// account for the fact that uint256S() loads a big-endian representation of
|
||||
// an integer which converted to little-endian internally.
|
||||
uint256 expected = uint256S("427719cde12e9ef88a2811be36a0ef15018c7674dc8faa76ace727fdbc09af6a");
|
||||
uint256 expected = uint256S("3e49b5f954aa9d3545bc6c37744661eea48d7c34e3000d82b7f0010c30f4c2fb");
|
||||
|
||||
ASSERT_TRUE(ZCSaplingIncrementalMerkleTree::empty_root() == expected);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
#include "uint256.h"
|
||||
|
||||
TEST(PedersenHash, TestAPI) {
|
||||
const uint256 a = uint256S("7082b0badf222555f0ca66a0636fef330668cfb957acb74989bb3f02b4655350");
|
||||
const uint256 b = uint256S("0e5da2185a44dacbce5179b7647857a7fb247bc9f06d8b9a9265d9a7beac8206");
|
||||
const uint256 a = uint256S("87a086ae7d2252d58729b30263fb7b66308bf94ef59a76c9c86e7ea016536505");
|
||||
const uint256 b = uint256S("a75b84a125b2353da7e8d96ee2a15efe4de23df9601b9d9564ba59de57130406");
|
||||
uint256 result;
|
||||
|
||||
librustzcash_merkle_hash(25, a.begin(), b.begin(), result.begin());
|
||||
|
||||
uint256 expected_result = uint256S("e8e2b51c00bb224aa8df57f511d306293878896818f41863326fcd2c16cdca42");
|
||||
uint256 expected_result = uint256S("5bf43b5736c19b714d1f462c9d22ba3492c36e3d9bbd7ca24d94b440550aa561");
|
||||
|
||||
ASSERT_TRUE(result == expected_result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user