From 33c5d59a058dd013b2be157a679526c844eed4be Mon Sep 17 00:00:00 2001 From: Zaid Date: Wed, 17 Apr 2024 21:07:10 +0530 Subject: [PATCH] test: reverted --- output.txt | 2 +- wTxIDs.txt | 2 +- witnessMerkle.go | 26 ++++++++++++-------------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/output.txt b/output.txt index 3f367a6c..8d563788 100644 --- a/output.txt +++ b/output.txt @@ -1,4 +1,4 @@ -070000000000000000000000000000000000000000000000000000000000000000000000c16bcf5d8c955166695eec0a1d4891b2887d2b1856938cbc48663905357427716ee81f66ffff001fbd740000 +070000000000000000000000000000000000000000000000000000000000000000000000c16bcf5d8c955166695eec0a1d4891b2887d2b1856938cbc486639053574277111e91f66ffff001f6c380100 010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff1b03951a0604f15ccf5609013803062b9b5a0100072f425443432f20ffffffff02de538c0100000000160014df4bf9f3621073202be59ae590f55f42879a21a00000000000000000266a24aa21a9ed392466efe913d353921707d69a39cfb22952a7d75de836728f73705b3c5db5e40120000000000000000000000000000000000000000000000000000000000000000000000000 ebc77710b2a547fe6cc86bc5b86fe810f291bcd40a9dd5e40dc8b84e866adc10 82f9f96db7bdbb9e70626747632e373b34eefd50d613dfea7092744169591b6e diff --git a/wTxIDs.txt b/wTxIDs.txt index 1fb89980..2cb73a66 100644 --- a/wTxIDs.txt +++ b/wTxIDs.txt @@ -3350,4 +3350,4 @@ bdc33896cf106e6587d9b73dc60dd1404f5d4ea5ee5a4b1a62f306b595de2bfa 4a668d3f7c8d1d486dee6080b08b527b4f351bfac4a5d4edb372c156a4392247 f961ccdc0dbcdb5c8c50c773017f3a9a2a13479396f7df72dee8b4420bd12c34 f1d0c081db9ee5a8fb47649c0fb6e4aadd8206a8e814b7d9181eaf0d9008c386 -0e842b572fbce0baff640096006a25a5da9899916c90fc42bc63c6b6a182c652 +0e842b572fbce0baff640096006a25a5da9899916c90fc42bc63c6b6a182c652 \ No newline at end of file diff --git a/witnessMerkle.go b/witnessMerkle.go index 58b9ef63..16343c87 100755 --- a/witnessMerkle.go +++ b/witnessMerkle.go @@ -3,25 +3,23 @@ package main import ( "encoding/hex" "fmt" - "os" - "strings" ) func CreateWitnessMerkle() string { _, _, wTxIDs := Prioritize() wTxIDs = append([]string{"0000000000000000000000000000000000000000000000000000000000000000"}, wTxIDs...) - var wtxidsnew []string - file, _ := os.ReadFile("wtxids.txt") - for _, line := range strings.Split(string(file), "\n") { - wtxidsnew = append(wtxidsnew, line) - } - for idx := range wtxidsnew { - byt, _ := hex.DecodeString(wtxidsnew[idx]) - byt = reverseBytes(byt) - wtxidsnew[idx] = hex.EncodeToString(byt) - } - fmt.Println(len(wtxidsnew)) - merkleRoot := NewMerkleTree(wtxidsnew) + // var wtxidsnew []string + // file, _ := os.ReadFile("wtxids.txt") + // for _, line := range strings.Split(string(file), "\n") { + // wtxidsnew = append(wtxidsnew, line) + // } + // for idx := range wtxidsnew { + // byt, _ := hex.DecodeString(wtxidsnew[idx]) + // byt = reverseBytes(byt) + // wtxidsnew[idx] = hex.EncodeToString(byt) + // } + // fmt.Println(len(wtxidsnew)) + merkleRoot := NewMerkleTree(wTxIDs) fmt.Println("WMKR: ", hex.EncodeToString(merkleRoot.Data)) commitment_string := hex.EncodeToString(merkleRoot.Data) + "0000000000000000000000000000000000000000000000000000000000000000" WitnessCommitment, _ := hex.DecodeString(commitment_string)