From 659a39931a7b5f331bf8e45c1263e42fa6abd380 Mon Sep 17 00:00:00 2001 From: ying tong Date: Thu, 13 Aug 2020 22:18:33 +0800 Subject: [PATCH] Make sure garbage bytes are different Co-authored-by: Daira Hopwood --- src/gtest/test_history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtest/test_history.cpp b/src/gtest/test_history.cpp index 4d95c73aa..9ea5bf427 100644 --- a/src/gtest/test_history.cpp +++ b/src/gtest/test_history.cpp @@ -192,8 +192,8 @@ TEST(History, GarbageMemoryHash) { HistoryNode node0Garbage = getLeafN(1); HistoryNode node1Garbage = getLeafN(2); - EXPECT_NE(node0.bytes, node0Garbage.bytes); - EXPECT_NE(node1.bytes, node1Garbage.bytes); + node0Garbage.bytes[NODE_SERIALIZED_LENGTH - 1] = node0.bytes[NODE_SERIALIZED_LENGTH - 1] ^ 1; + node1Garbage.bytes[NODE_SERIALIZED_LENGTH - 1] = node1.bytes[NODE_SERIALIZED_LENGTH - 1] ^ 1; viewGarbage.PushHistoryNode(consensusBranchId, node0Garbage); viewGarbage.PushHistoryNode(consensusBranchId, node1Garbage);