Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
Seperator
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberhorsey committed Jan 22, 2024
1 parent 2fba690 commit 37f7920
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions prover/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

var (
blockKeyPrefix = "block-"
blockKeyPrefix = "block"
separator = "++"
)

Expand All @@ -26,9 +26,8 @@ func BuildBlockKey(blockTimestamp uint64, blockNumber uint64) []byte {
[][]byte{
[]byte(blockKeyPrefix),
[]byte(strconv.Itoa(int(blockTimestamp))),
[]byte(separator),
[]byte(strconv.Itoa(int(blockNumber))),
}, []byte{})
}, []byte(separator))
}

// BuildBlockValue will build a block value for a signed block
Expand Down
2 changes: 1 addition & 1 deletion prover/db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func Test_BuildBlockKey(t *testing.T) {
assert.Equal(t, []byte("block-1++300"), BuildBlockKey(1, 300))
assert.Equal(t, []byte("block++1++300"), BuildBlockKey(1, 300))
}

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

0 comments on commit 37f7920

Please sign in to comment.