Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arijitAD committed Dec 2, 2021
1 parent b6dda94 commit 97150bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dot/network/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"errors"
"fmt"

"google.golang.org/protobuf/proto"

pb "github.com/ChainSafe/gossamer/dot/network/proto"
"github.com/ChainSafe/gossamer/dot/types"
"github.com/ChainSafe/gossamer/lib/common"
"github.com/ChainSafe/gossamer/lib/common/variadic"
"github.com/ChainSafe/gossamer/pkg/scale"
"google.golang.org/protobuf/proto"
)

// Message types for notifications protocol messages. Used internally to map message to protocol.
Expand Down Expand Up @@ -306,7 +307,6 @@ func blockDataToProtobuf(bd *types.BlockData) (*pb.BlockData, error) {
func protobufToBlockData(pbd *pb.BlockData) (*types.BlockData, error) {
bd := &types.BlockData{
Hash: common.BytesToHash(pbd.Hash),
Header: types.NewEmptyHeader(),
}

if pbd.Header != nil {
Expand All @@ -317,8 +317,6 @@ func protobufToBlockData(pbd *pb.BlockData) (*types.BlockData, error) {
}

bd.Header = header
} else {
bd.Header = nil
}

if pbd.Body != nil {
Expand Down

0 comments on commit 97150bf

Please sign in to comment.