Skip to content

Commit

Permalink
removed duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Dec 7, 2020
1 parent 9ae1f44 commit 6cc573e
Show file tree
Hide file tree
Showing 9 changed files with 514 additions and 800 deletions.
3 changes: 2 additions & 1 deletion api/keystore/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/ava-labs/avalanchego/chains/atomic"
"github.com/ava-labs/avalanchego/codec"
"github.com/ava-labs/avalanchego/codec/linearcodec"
"github.com/ava-labs/avalanchego/codec/reflectcodec"
"github.com/ava-labs/avalanchego/database"
"github.com/ava-labs/avalanchego/database/encdb"
"github.com/ava-labs/avalanchego/database/memdb"
Expand Down Expand Up @@ -79,7 +80,7 @@ type Keystore struct {

// Initialize the keystore
func (ks *Keystore) Initialize(log logging.Logger, db database.Database) error {
c := linearcodec.New(linearcodec.DefaultTagName, maxSliceLength)
c := linearcodec.New(reflectcodec.DefaultTagName, maxSliceLength)
manager := codec.NewManager(maxPackerSize)
if err := manager.RegisterCodec(codecVersion, c); err != nil {
return err
Expand Down
Loading

0 comments on commit 6cc573e

Please sign in to comment.