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 authored and timwu20 committed Dec 6, 2021
1 parent 8312490 commit 6f34b1b
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 6f34b1b

Please sign in to comment.