github.com/MetalBlockchain/metalgo@v1.11.9/chains/registrant.go (about) 1 // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. 2 // See the file LICENSE for licensing terms. 3 4 package chains 5 6 import ( 7 "github.com/MetalBlockchain/metalgo/snow" 8 "github.com/MetalBlockchain/metalgo/snow/engine/common" 9 ) 10 11 // Registrant can register the existence of a chain 12 type Registrant interface { 13 // Called when a chain is created 14 // This function is called before the chain starts processing messages 15 // [vm] should be a vertex.DAGVM or block.ChainVM 16 RegisterChain(chainName string, ctx *snow.ConsensusContext, vm common.VM) 17 }