diff --git a/dot/network/message.go b/dot/network/message.go index d759865f47d..6d28e5efa1c 100644 --- a/dot/network/message.go +++ b/dot/network/message.go @@ -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. @@ -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 { @@ -317,8 +317,6 @@ func protobufToBlockData(pbd *pb.BlockData) (*types.BlockData, error) { } bd.Header = header - } else { - bd.Header = nil } if pbd.Body != nil {