OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update
[bytom/vapor.git]
/
consensus
/
general.go
diff --git
a/consensus/general.go
b/consensus/general.go
index
32620ac
..
f3bab4e
100644
(file)
--- a/
consensus/general.go
+++ b/
consensus/general.go
@@
-2,6
+2,7
@@
package consensus
import (
"encoding/binary"
import (
"encoding/binary"
+ "fmt"
"github.com/vapor/protocol/bc"
)
"github.com/vapor/protocol/bc"
)
@@
-225,3
+226,11
@@
func BytomMainNetParams(vaporParam *Params) *Params {
}
return &Params{Bech32HRPSegwit: bech32HRPSegwit}
}
}
return &Params{Bech32HRPSegwit: bech32HRPSegwit}
}
+
+func InitActiveNetParams(chainID string) error {
+ var exist bool
+ if ActiveNetParams, exist = NetParams[chainID]; !exist {
+ return fmt.Errorf("chain_id[%v] don't exist", chainID)
+ }
+ return nil
+}