github.com/MetalBlockchain/metalgo@v1.11.9/snow/validators/unhandled_subnet_connector.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package validators 5 6 import ( 7 "context" 8 "fmt" 9 10 "github.com/MetalBlockchain/metalgo/ids" 11 ) 12 13 var UnhandledSubnetConnector SubnetConnector = &unhandledSubnetConnector{} 14 15 type unhandledSubnetConnector struct{} 16 17 func (unhandledSubnetConnector) ConnectedSubnet(_ context.Context, nodeID ids.NodeID, subnetID ids.ID) error { 18 return fmt.Errorf( 19 "unhandled ConnectedSubnet with nodeID=%q and subnetID=%q", 20 nodeID, 21 subnetID, 22 ) 23 }