Skip to content

Commit

Permalink
fix(dot/network): Fix missing digest in header (ChainSafe#2092)
Browse files Browse the repository at this point in the history
* Fix missing digest in header
  • Loading branch information
arijitAD committed Dec 2, 2021
1 parent 461890c commit 21ea85e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 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 @@ -305,8 +306,7 @@ 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(),
Hash: common.BytesToHash(pbd.Hash),
}

if pbd.Header != nil {
Expand Down

0 comments on commit 21ea85e

Please sign in to comment.