Skip to content

Commit fd733ae

Browse files
committed
chore: nits + fixes
Signed-off-by: Ji Hwan <[email protected]>
1 parent f9e67de commit fd733ae

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

p2p/database/noop.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (n *NoopDatabase) WriteBlock(ctx context.Context, peer *enode.Node, block *
2626
}
2727

2828
// WriteBlockHeaders does nothing.
29-
func (n *NoopDatabase) WriteBlockHeaders(ctx context.Context, headers []*types.Header, tfs time.Time) {
29+
func (n *NoopDatabase) WriteBlockHeaders(ctx context.Context, headers []*types.Header, tfs time.Time, isParent bool) {
3030
}
3131

3232
// WriteBlockHashes does nothing.
@@ -83,4 +83,4 @@ func (n *NoopDatabase) ShouldWritePeers() bool {
8383
// NodeList returns an empty list.
8484
func (n *NoopDatabase) NodeList(ctx context.Context, limit int) ([]string, error) {
8585
return []string{}, nil
86-
}
86+
}

p2p/protocol.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,6 @@ func NewEthProtocol(version uint, opts EthProtocolOptions) ethp2p.Protocol {
146146

147147
ctx := opts.Context
148148

149-
// Register connection with the manager if available
150-
if opts.ConnManager != nil {
151-
opts.ConnManager.AddConnection(p.Node().ID().String(), c)
152-
defer opts.ConnManager.RemoveConnection(p.Node().ID().String())
153-
}
154-
155149
// Handle all the of the messages here.
156150
for {
157151
msg, err := rw.ReadMsg()

0 commit comments

Comments
 (0)