mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-11-23 22:15:54 +00:00
Replace our current PoW algorithm with oPoW
This commit is contained in:
parent
98a7925eb6
commit
c87fbddf2f
@ -52,7 +52,10 @@ func CalculateProofOfWorkValue(header externalapi.MutableBlockHeader) *big.Int {
|
||||
if err != nil {
|
||||
panic(errors.Wrap(err, "this should never happen. Hash digest should never return an error"))
|
||||
}
|
||||
return toBig(writer.Finalize())
|
||||
powHash := writer.Finalize()
|
||||
matrix := generateMatrix(powHash)
|
||||
heavyHash := matrix.HeavyHash(powHash)
|
||||
return toBig(heavyHash)
|
||||
}
|
||||
|
||||
// ToBig converts a externalapi.DomainHash into a big.Int treated as a little endian string.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user