test: Add test case for popping from an empty history tree

This commit is contained in:
Jack Grigg 2021-06-20 22:48:10 +01:00
parent 3efa9cb75e
commit e89f93ff85
1 changed files with 4 additions and 0 deletions

View File

@ -174,6 +174,10 @@ TEST(History, EpochBoundaries) {
view.PopHistoryNode(epoch2);
EXPECT_EQ(view.GetHistoryLength(epoch2), 0);
// Trying to truncate an empty tree is a no-op
view.PopHistoryNode(epoch2);
EXPECT_EQ(view.GetHistoryLength(epoch2), 0);
}
TEST(History, GarbageMemoryHash) {