Skip to content

Commit

Permalink
multiple protocol fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
e-asphyx committed Jan 9, 2025
1 parent cf6bc12 commit 94c7ae3
Show file tree
Hide file tree
Showing 61 changed files with 39,490 additions and 978 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/ecadlabs/gotez/v2

go 1.20
go 1.23

require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0
Expand Down
41 changes: 20 additions & 21 deletions protocol/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,21 @@ var testData = []protoTestData{
{
proto: &core.Proto021PsQuebec,
blocks: []string{
"155262",
"155263",
"155264",
"155265",
"155266",
"155267",
"155268",
"155269",
"155270",
"155271",
"155272",
"155273",
"155274",
"155275",
"155276",
"155277",
"155278",
"155279",
"155280",
"155281",
"1196001",
"1196033",
"1196086",
"1197064",
"1197095",
"1197101",
"1197107",
"1197158",
"1197165",
"1197167",
"1197183",
"1233892",
"1234288",
"1234330",
"775785",
},
},
{
Expand Down Expand Up @@ -168,7 +163,11 @@ func TestBlock(t *testing.T) {
require.NoError(t, err)
_, err = encoding.Decode(buf, out, encoding.Dynamic())
if !assert.NoError(t, err) {
//pretty.Println(out)
//c := spew.NewDefaultConfig()
//c.DisableMethods = true
//c.Dump(out)
//j, _ := json.MarshalIndent(out, "", " ")
//fmt.Println(string(j))
if err, ok := err.(*encoding.Error); ok {
fmt.Println(err.Path)
}
Expand Down
128 changes: 64 additions & 64 deletions protocol/core/json_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import (
"os"
"strings"

"github.com/ecadlabs/gotez/v2/b58"
"github.com/ecadlabs/gotez/v2/b58/base58"
)

func main() {
for i := 1; i < len(os.Args); i++ {
hash, err := b58.ParseProtocolHash([]byte(os.Args[i]))
_, data, err := base58.DecodeTZ([]byte(os.Args[i]))
if err != nil {
log.Fatal(err)
}
hex := make([]string, len(hash))
for j, x := range hash {
hex := make([]string, len(data))
for j, x := range data {
hex[j] = fmt.Sprintf("0x%02x", x)
}
fmt.Println(strings.Join(hex, ","))
Expand Down
1 change: 0 additions & 1 deletion protocol/latest/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ type Endorsement = latest.Attestation
type EndorsementContentsAndResult = latest.AttestationContentsAndResult
type InlinedEndorsementContents = latest.InlinedAttestationContents
type InlinedAttestationContents = latest.InlinedAttestationContents
type DALAttestation = latest.DALAttestation
type Reveal = latest.Reveal
type RevealContentsAndResult = latest.RevealContentsAndResult
type Transaction = latest.Transaction
Expand Down
128 changes: 64 additions & 64 deletions protocol/proto_012_Psithaca/json_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94c7ae3

Please sign in to comment.