OSDN Git Service

consensus should be able to change (#300)
[bytom/vapor.git] / consensus / general.go
index bc311b2..0a399c2 100644 (file)
@@ -206,7 +206,13 @@ func BlockSubsidy(height uint64) uint64 {
 }
 
 // BytomMainNetParams is the config for bytom mainnet
-var BytomMainNetParams = Params{
-       Name:            "main",
-       Bech32HRPSegwit: "bm",
+func BytomMainNetParams(vaporParam *Params) *Params {
+       bech32HRPSegwit := "sm"
+       switch vaporParam.Name {
+       case "main":
+               bech32HRPSegwit = "bm"
+       case "test":
+               bech32HRPSegwit = "tm"
+       }
+       return &Params{Bech32HRPSegwit: bech32HRPSegwit}
 }