1 seed works

This commit is contained in:
Anh Minh 2025-10-09 09:55:52 +07:00
parent 61c9726b4f
commit 61e84ab801

View File

@ -213,9 +213,9 @@ func HashSpend(spend *nockchain.NockchainSpend) ([5]uint64, error) {
return [5]uint64{}, err
}
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5ZeroZero)
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero)
if seedsCount != 1 {
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero)
for i := 1; i < seedsCount; i++ {
seedHash, err := HashSeedWithoutSource(spend.Seeds[seedsCount-1-i])
if err != nil {
@ -238,9 +238,9 @@ func HashMsg(spend *nockchain.NockchainSpend) ([5]uint64, error) {
return [5]uint64{}, err
}
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5ZeroZero)
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero)
if seedsCount != 1 {
finalSeedHash = crypto.Tip5RehashTenCell(finalSeedHash, crypto.Tip5Zero)
for i := 1; i < seedsCount; i++ {
seedHash, err := HashSeed(spend.Seeds[seedsCount-1-i])
if err != nil {