Skip to content

Commit 5af73b9

Browse files
fix ChainEpoch index (#53)
Signed-off-by: Alexey-N-Chernyshov <[email protected]>
1 parent c1fe4e5 commit 5af73b9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/crypto/randomness/impl/randomness_provider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace fc::crypto::randomness {
1818
Randomness RandomnessProviderImpl::deriveRandomness(DomainSeparationTag tag,
1919
Serialization s,
2020
ChainEpoch index) {
21-
return deriveRandomnessInternal(tag, std::move(s), static_cast<size_t>(-1));
21+
return deriveRandomnessInternal(tag, std::move(s), index);
2222
}
2323

2424
Randomness RandomnessProviderImpl::deriveRandomnessInternal(

test/core/crypto/randomness/randomness_provider_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ INSTANTIATE_TEST_CASE_P(
7878
DomainSeparationTag::TicketDrawingDST,
7979
Buffer{1, 2, 3},
8080
1,
81-
"0C2DF41915B1933A769770C18D7C60F5DA810A29CEA52C8A967CD273A44F23C8"_hash256),
81+
"C4E51A115F7505FD0992CC5B638875D3BCA313CB2F5D7DE1F1D0B2CB3A3857E8"_hash256),
8282
RandomnessProviderTest::makeParams(
8383
DomainSeparationTag::TicketProductionDST,
8484
Buffer{1, 2},
8585
2,
86-
"955EC7735C73E202920C19D9EC7CDE93440B0DEF179853254D52E34E606D0E3D"_hash256),
86+
"EBB9FAA31980E474AD7D0D3D51369E76D7DB383945545F5A23075A27544D1412"_hash256),
8787
RandomnessProviderTest::makeParams(
8888
DomainSeparationTag::PoStDST,
8989
Buffer{1},
9090
3,
91-
"EEEF98ED7B888D6A4B0BA7631185DEF061421142E93D1BA96A889AAA7224B9E8"_hash256)));
91+
"4FB8E678AF9CD7DD078EE47249A5AFC10D53DC3F548A22AAEE9DB4903A9D0212"_hash256)));
9292

9393
struct RandomnessProviderValuesTest : public RandomnessProviderBaseTest,
9494
public ::testing::Test {

0 commit comments

Comments
 (0)