Skip to content

Commit

Permalink
Fix encode decode tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Nov 29, 2021
1 parent 8ffb440 commit 7069bd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/trie/encodedecode_test/branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"testing"

"github.com/ChainSafe/gossamer/lib/trie/branch"
"github.com/ChainSafe/gossamer/lib/trie/decode"
"github.com/ChainSafe/gossamer/lib/trie/leaf"
"github.com/ChainSafe/gossamer/lib/trie/node"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -78,7 +79,9 @@ func Test_Branch_Encode_Decode(t *testing.T) {
err := testCase.branchToEncode.Encode(buffer)
require.NoError(t, err)

const header = 0
header, err := decode.ReadNextByte(buffer)
require.NoError(t, err)

resultBranch, err := branch.Decode(buffer, header)
require.NoError(t, err)

Expand Down

0 comments on commit 7069bd3

Please sign in to comment.