Fix Bug
- Add nil check for chain of genesis.
@@ -247,9 +247,11 @@ type chain struct {
func (s *ChainScore) Install(param []byte) error {
chainCfg := chain{}
+ if param != nil {
if err := json.Unmarshal(param, &chainCfg); err != nil {
log.Panicf("Failed to parse parameter for chainScore. err = %s", err)
}
+ }
confValue := 0
if chainCfg.AuditEnabled == true {
confValue |= state.SysConfigAudit
