Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::equihash::proof Struct Reference

#include <equihash.hpp>

Collaboration diagram for fc::equihash::proof:

Public Member Functions

bool is_valid () const
 

Static Public Member Functions

static proof hash (uint32_t n, uint32_t k, sha256 seed)
 

Public Attributes

uint32_t n
 
uint32_t k
 
sha256 seed
 
std::vector< uint32_tinputs
 

Detailed Description

Definition at line 7 of file equihash.hpp.

Member Function Documentation

◆ hash()

proof fc::equihash::proof::hash ( uint32_t n,
uint32_t k,
sha256 seed )
static

Definition at line 33 of file equihash.cpp.

34 {
35 auto hash = _POW::Equihash( n, k, sha_to_seed( seed ) );
36 auto result = hash.FindProof( EQUIHASH_NONCE );
37
38 proof p;
39 p.n = n;
40 p.k = k;
41 p.seed = seed;
42 p.inputs = result.inputs;
43
44 return p;
45 }
const mie::Vuint & p
Definition bn.cpp:27
#define EQUIHASH_NONCE
Definition equihash.cpp:5
_POW::Seed sha_to_seed(sha256 seed)
Definition equihash.cpp:9
Here is the call graph for this function:

◆ is_valid()

bool fc::equihash::proof::is_valid ( ) const

Definition at line 26 of file equihash.cpp.

27 {
28 _POW::Proof test( n, k, sha_to_seed( seed ), EQUIHASH_NONCE, inputs );
29 return test.Test();
30
31 }
@ test
Unit testing utility error code.
Definition error.hpp:96
std::vector< uint32_t > inputs
Definition equihash.hpp:12
Here is the call graph for this function:

Member Data Documentation

◆ inputs

std::vector< uint32_t > fc::equihash::proof::inputs

Definition at line 12 of file equihash.hpp.

◆ k

uint32_t fc::equihash::proof::k

Definition at line 10 of file equihash.hpp.

◆ n

uint32_t fc::equihash::proof::n

Definition at line 9 of file equihash.hpp.

◆ seed

sha256 fc::equihash::proof::seed

Definition at line 11 of file equihash.hpp.


The documentation for this struct was generated from the following files: