mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
save (#3031)
This commit is contained in:
parent
726278fd8a
commit
9d46c80046
@ -338,10 +338,34 @@ func runPeer(
|
||||
}
|
||||
send(eth.ToProto[protocol][msg.Code], peerID, b)
|
||||
case eth.GetNodeDataMsg:
|
||||
if !hasSubscribers(eth.ToProto[protocol][msg.Code]) {
|
||||
continue
|
||||
}
|
||||
b := make([]byte, msg.Size)
|
||||
if _, err := io.ReadFull(msg.Payload, b); err != nil {
|
||||
log.Error(fmt.Sprintf("%s: reading msg into bytes: %v", peerID, err))
|
||||
}
|
||||
send(eth.ToProto[protocol][msg.Code], peerID, b)
|
||||
//log.Info(fmt.Sprintf("[%s] GetNodeData", peerID))
|
||||
case eth.GetReceiptsMsg:
|
||||
if !hasSubscribers(eth.ToProto[protocol][msg.Code]) {
|
||||
continue
|
||||
}
|
||||
b := make([]byte, msg.Size)
|
||||
if _, err := io.ReadFull(msg.Payload, b); err != nil {
|
||||
log.Error(fmt.Sprintf("%s: reading msg into bytes: %v", peerID, err))
|
||||
}
|
||||
send(eth.ToProto[protocol][msg.Code], peerID, b)
|
||||
//log.Info(fmt.Sprintf("[%s] GetReceiptsMsg", peerID))
|
||||
case eth.ReceiptsMsg:
|
||||
if !hasSubscribers(eth.ToProto[protocol][msg.Code]) {
|
||||
continue
|
||||
}
|
||||
b := make([]byte, msg.Size)
|
||||
if _, err := io.ReadFull(msg.Payload, b); err != nil {
|
||||
log.Error(fmt.Sprintf("%s: reading msg into bytes: %v", peerID, err))
|
||||
}
|
||||
send(eth.ToProto[protocol][msg.Code], peerID, b)
|
||||
//log.Info(fmt.Sprintf("[%s] ReceiptsMsg", peerID))
|
||||
case eth.NewBlockHashesMsg:
|
||||
if !hasSubscribers(eth.ToProto[protocol][msg.Code]) {
|
||||
|
Loading…
Reference in New Issue
Block a user