lotus/build/params_shared_funcs.go
Steven Allen 710ac9d544 use the correct network version in genesis
1. Version 0 upgrades happen _after_ genesis.
2. Get rid of UseNewestNetwork. It's not useful and quite dangerous.
2020-10-21 12:18:38 -07:00

22 lines
585 B
Go

package build
import (
"github.com/filecoin-project/go-address"
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
// Core network constants
func BlocksTopic(netName dtypes.NetworkName) string { return "/fil/blocks/" + string(netName) }
func MessagesTopic(netName dtypes.NetworkName) string { return "/fil/msgs/" + string(netName) }
func DhtProtocolName(netName dtypes.NetworkName) protocol.ID {
return protocol.ID("/fil/kad/" + string(netName))
}
func SetAddressNetwork(n address.Network) {
address.CurrentNetwork = n
}