Skip to content

Commit

Permalink
mt
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Nov 21, 2024
1 parent 2819f1a commit 152bb6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/types/wo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ func (wh *WorkObjectHeader) Hash() (hash common.Hash) {
hasher.Reset()
var hData [32 + 32 + 8]byte
copy(hData[:], wh.MixHash().Bytes())
copy(hData[:], wh.Nonce().Bytes())
copy(hData[len(wh.mixHash):], wh.Nonce().Bytes())
copy(hData[len(wh.mixHash)+len(wh.nonce):], sealHash)
sum := blake3.Sum256(hData[:])
hash.SetBytes(sum[:])
Expand Down
4 changes: 2 additions & 2 deletions core/types/wo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func woTestData() (*WorkObject, common.Hash) {
}

var (
expectedWoHash = common.HexToHash("0x7a107825db4e54d262248b6d619679a94e8235a2ae01fd06b4e3819179b81d3a")
expectedWoHash = common.HexToHash("0xa15b8e777efe3a2fc09a2e9398495b7f2c8567b66859ad2410453eaf420f32f7")
expectedUncleHash = common.HexToHash("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347")
expectedPETXProtoBytes = []byte{
0x0a, 0xc0, 0x01, 0x0a, 0x22, 0x0a, 0x20, 0x97, 0xb8, 0xd8, 0x2d, 0x3f, 0x97, 0x82, 0x7d, 0x2f,
Expand Down Expand Up @@ -256,7 +256,7 @@ func TestCalcUncleHash(t *testing.T) {
{
uncleNum: 5,
expectedUncleHash: common.HexToHash("0x3c9dd26495f9a6ddf36e1443bee2ff0a3bb59b0722a765b145d01ab1f78ccd44"),
expectedWoHash: common.HexToHash("0x0cf899993d6dd984fdc862a159d2740562c266712d5505168480bade496816b2"),
expectedWoHash: common.HexToHash("0xc56d8061c19ee24920a2039cb113e4fb27a5b4b02bd7f1a6045811366fa26fde"),
shouldPass: true,
},
}
Expand Down

0 comments on commit 152bb6f

Please sign in to comment.