Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Neznaemov committed Oct 3, 2023
1 parent bd5ca79 commit 639f088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions observer/block_channel_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func (p *ParsedBlockChannel) Observe(ctx context.Context) (<-chan *ParsedBlock,
return nil, fmt.Errorf("observe common blocks: %w", err)
}

p.blocks = make(chan *ParsedBlock)

go func() {
p.isWork = true

Expand Down
5 changes: 4 additions & 1 deletion observer/block_peer_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ func WithConfigBlocks(configBlocks map[string]*common.Block) ParsedBlockPeerOpt

func NewParsedBlockPeer(blocksPeer *BlockPeer, opts ...ParsedBlockPeerOpt) *ParsedBlockPeer {
parsedBlockPeer := &ParsedBlockPeer{
blockPeer: blocksPeer,
blockPeer: blocksPeer,
parsedChannelObservers: make(map[string]*parsedBlockPeerChannel),
blocks: make(chan *ParsedBlock),
blocksByChannels: make(map[string]chan *ParsedBlock),
}

for _, opt := range opts {
Expand Down

0 comments on commit 639f088

Please sign in to comment.