Skip to content

Commit 94e9798

Browse files
authored
Fix "One Definition Rule" Violation for Prover::GetForm (#306)
1 parent 767a534 commit 94e9798

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/hw/hw_proof.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,13 @@ class HwProver : public ParallelProver {
577577
pos_offset = segm.start / vdf->interval;
578578
}
579579

580-
form* GetForm(uint64_t pos) {
580+
form GetForm(uint64_t pos) {
581581
pos += pos_offset;
582582
if (hw_proof_wait_value(vdf, pos)) {
583583
// Provide arbitrary value when stopping - proof won't be computed
584-
return &vdf->values[0][0];
584+
return vdf->values[0][0];
585585
}
586-
return hw_proof_value_at(vdf, pos);
586+
return *hw_proof_value_at(vdf, pos);
587587
}
588588

589589
void start() {

src/vdf_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class Prover {
267267
is_finished = false;
268268
}
269269

270-
virtual form* GetForm(uint64_t iteration) = 0;
270+
virtual form GetForm(uint64_t iteration) = 0;
271271
virtual void start() = 0;
272272
virtual void stop() = 0;
273273
virtual bool PerformExtraStep() = 0;

0 commit comments

Comments
 (0)