Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jan 29, 2025
1 parent 81f22f8 commit 035cf9c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions core/v2/serialization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v2_test

import (
"encoding/hex"
"fmt"
"math/big"
"testing"

Expand Down Expand Up @@ -52,8 +53,8 @@ func TestBlobKeyFromHeader(t *testing.T) {
}
blobKey, err := bh.BlobKey()
assert.NoError(t, err)
// 0xac17ec01189d04e827ea282f49077b138f0aefa5177be146a74ae51135868c57 verified in solidity
assert.Equal(t, "ac17ec01189d04e827ea282f49077b138f0aefa5177be146a74ae51135868c57", blobKey.Hex())
// 0x2bac85c7fc4c21ad02538a7eb44b120efbc64d25b1691470273f84c8cf82187a has not verified in solidity
assert.Equal(t, "2bac85c7fc4c21ad02538a7eb44b120efbc64d25b1691470273f84c8cf82187a", blobKey.Hex())
}

func TestBatchHeaderHash(t *testing.T) {
Expand Down Expand Up @@ -110,8 +111,10 @@ func TestBlobCertHash(t *testing.T) {

hash, err := blobCert.Hash()
assert.NoError(t, err)
// 0x1db857aeead06422b8d727dc3972db6ceb04ceb87e194cb6c2389ac3015eda49 verified in solidity
assert.Equal(t, "1db857aeead06422b8d727dc3972db6ceb04ceb87e194cb6c2389ac3015eda49", hex.EncodeToString(hash[:]))

fmt.Printf("%x", hash)
// afa39b4c45197f0254f7e8e2127c797c74578357e9f077eab7a8aa62e1402bec has not verified in solidity
assert.Equal(t, "afa39b4c45197f0254f7e8e2127c797c74578357e9f077eab7a8aa62e1402bec", hex.EncodeToString(hash[:]))
}

func TestBlobCertSerialization(t *testing.T) {
Expand Down

0 comments on commit 035cf9c

Please sign in to comment.