Files
zeekay 2306c15247 chore: update dependencies and fix proto compatibility
Update proto definitions to match latest p2p spec.
Remove AllChains field from Handshake/GetPeerList messages.
Update dependency versions.
2026-01-26 08:30:22 -08:00

43 lines
775 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package message
import (
"time"
"github.com/luxfi/metric"
"github.com/luxfi/node/utils/compression"
)
var _ Creator = (*creator)(nil)
type Creator interface {
OutboundMsgBuilder
InboundMsgBuilder
}
type creator struct {
OutboundMsgBuilder
InboundMsgBuilder
}
func NewCreator(
metrics metric.Registerer,
compressionType compression.Type,
maxMessageTimeout time.Duration,
) (Creator, error) {
builder, err := newMsgBuilder(
metrics,
maxMessageTimeout,
)
if err != nil {
return nil, err
}
return &creator{
OutboundMsgBuilder: newOutboundBuilder(compressionType, builder),
InboundMsgBuilder: newInboundBuilder(builder),
}, nil
}