Store the Equihash solution in minimal representation in the block header
The genesis blocks and miner tests have been regenerated, because changing the block header serialisation format changes the block hash, and thus validity. The Equihash solutions have been removed from the bloom test inputs for simplicity (block validity is not checked there; only a valid serialisation is necessary).
This commit is contained in:
@@ -10,11 +10,9 @@
|
||||
template<size_t WIDTH>
|
||||
bool DistinctIndices(const FullStepRow<WIDTH>& a, const FullStepRow<WIDTH>& b, size_t len, size_t lenIndices)
|
||||
{
|
||||
std::vector<eh_index> vIndicesA = a.GetIndices(len, lenIndices);
|
||||
std::vector<eh_index> vIndicesB = b.GetIndices(len, lenIndices);
|
||||
for(auto const& value1: vIndicesA) {
|
||||
for(auto const& value2: vIndicesB) {
|
||||
if (value1==value2) {
|
||||
for(size_t i = 0; i < lenIndices; i += sizeof(eh_index)) {
|
||||
for(size_t j = 0; j < lenIndices; j += sizeof(eh_index)) {
|
||||
if (memcmp(a.hash+len+i, b.hash+len+j, sizeof(eh_index)) == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user