Skip to content

Commit

Permalink
test: reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
pred695 committed Apr 17, 2024
1 parent 92f3e67 commit 33c5d59
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion output.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
070000000000000000000000000000000000000000000000000000000000000000000000c16bcf5d8c955166695eec0a1d4891b2887d2b1856938cbc48663905357427716ee81f66ffff001fbd740000
070000000000000000000000000000000000000000000000000000000000000000000000c16bcf5d8c955166695eec0a1d4891b2887d2b1856938cbc486639053574277111e91f66ffff001f6c380100
010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff1b03951a0604f15ccf5609013803062b9b5a0100072f425443432f20ffffffff02de538c0100000000160014df4bf9f3621073202be59ae590f55f42879a21a00000000000000000266a24aa21a9ed392466efe913d353921707d69a39cfb22952a7d75de836728f73705b3c5db5e40120000000000000000000000000000000000000000000000000000000000000000000000000
ebc77710b2a547fe6cc86bc5b86fe810f291bcd40a9dd5e40dc8b84e866adc10
82f9f96db7bdbb9e70626747632e373b34eefd50d613dfea7092744169591b6e
Expand Down
2 changes: 1 addition & 1 deletion wTxIDs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3350,4 +3350,4 @@ bdc33896cf106e6587d9b73dc60dd1404f5d4ea5ee5a4b1a62f306b595de2bfa
4a668d3f7c8d1d486dee6080b08b527b4f351bfac4a5d4edb372c156a4392247
f961ccdc0dbcdb5c8c50c773017f3a9a2a13479396f7df72dee8b4420bd12c34
f1d0c081db9ee5a8fb47649c0fb6e4aadd8206a8e814b7d9181eaf0d9008c386
0e842b572fbce0baff640096006a25a5da9899916c90fc42bc63c6b6a182c652
0e842b572fbce0baff640096006a25a5da9899916c90fc42bc63c6b6a182c652
26 changes: 12 additions & 14 deletions witnessMerkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 33c5d59

Please sign in to comment.