Removing timestamp changing and re-signing as this is re-testing something that's already tested above, signature correctness with respect to vote contents.

This commit is contained in:
clemahieu 2021-10-27 14:11:22 +01:00
commit fb8e912dfc
No known key found for this signature in database
GPG key ID: 43708520C8DFB938

View file

@ -37,12 +37,6 @@ TEST (vote_processor, codes)
// Invalid takes precedence
ASSERT_EQ (nano::vote_code::invalid, node.vote_processor.vote_blocking (vote_invalid, channel));
// A higher timestamp is not a replay
++vote->timestamp;
ASSERT_EQ (nano::vote_code::invalid, node.vote_processor.vote_blocking (vote, channel));
vote->signature = nano::sign_message (key.prv, key.pub, vote->hash ());
ASSERT_EQ (nano::vote_code::vote, node.vote_processor.vote_blocking (vote, channel));
// Once the election is removed (confirmed / dropped) the vote is again indeterminate
node.active.erase (*nano::dev::genesis);
ASSERT_EQ (nano::vote_code::indeterminate, node.vote_processor.vote_blocking (vote, channel));