mirror of
https://github.com/luxfi/platformvm.git
synced 2026-10-30 15:22:12 +00:00
- Drop atomic_block.go + legacy *_block_test.go (consolidated) - Add block/v0/ subdir + lift_v0.go for old version handling - Copyright header: 'Lux Industries, Inc.' → 'Lux Industries Inc' (no comma) - block_adapter.go: new adapter layer
39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package platformvm
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/math/set"
|
|
"github.com/luxfi/p2p"
|
|
"github.com/luxfi/warp"
|
|
)
|
|
|
|
// TestSender is a test implementation of warp.Sender (p2p.Sender) for platformvm tests
|
|
type TestSender struct{}
|
|
|
|
var _ warp.Sender = (*TestSender)(nil)
|
|
|
|
// SendRequest sends a request to the specified nodes (no-op for tests)
|
|
func (t *TestSender) SendRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, request []byte) error {
|
|
return nil
|
|
}
|
|
|
|
// SendResponse sends a response to a previous request (no-op for tests)
|
|
func (t *TestSender) SendResponse(ctx context.Context, nodeID ids.NodeID, requestID uint32, response []byte) error {
|
|
return nil
|
|
}
|
|
|
|
// SendError sends an error response to a previous request (no-op for tests)
|
|
func (t *TestSender) SendError(ctx context.Context, nodeID ids.NodeID, requestID uint32, errorCode int32, errorMessage string) error {
|
|
return nil
|
|
}
|
|
|
|
// SendGossip sends a gossip message (no-op for tests)
|
|
func (t *TestSender) SendGossip(ctx context.Context, config p2p.SendConfig, msg []byte) error {
|
|
return nil
|
|
}
|