From 0cc226c52a3f0502243990760fba631d75ca4b6e Mon Sep 17 00:00:00 2001 From: Anh Minh <1phamminh0811@gmail.com> Date: Mon, 13 Oct 2025 13:27:30 +0700 Subject: [PATCH] fix: send tx with 2 seeds --- wallet/nockhash.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 {