diff --git a/wallet/nockhash.go b/wallet/nockhash.go index d4fc0b8..e88ad62 100644 --- a/wallet/nockhash.go +++ b/wallet/nockhash.go @@ -211,7 +211,7 @@ func HashSpend(spend *nockchain.NockchainSpend) ([5]uint64, error) { finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5ZeroZero) if seedsCount != 1 { - finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero) + finalSeedHash = crypto.Tip5RehashTenCell(crypto.Tip5Zero, finalSeedHash) for i := 1; i < seedsCount; i++ { seedHash, err := HashSeedWithoutSource(spend.Seeds[seedsCount-1-i]) if err != nil { @@ -236,7 +236,8 @@ func HashMsg(spend *nockchain.NockchainSpend) ([5]uint64, error) { finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5ZeroZero) if seedsCount != 1 { - finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero) + finalSeedHash = crypto.Tip5RehashTenCell(crypto.Tip5Zero, finalSeedHash) + for i := 1; i < seedsCount; i++ { seedHash, err := HashSeed(spend.Seeds[seedsCount-1-i]) if err != nil {