mirror of https://github.com/poanetwork/quorum.git
handling null pointer error for voter list when network brought in non permissioned mode
This commit is contained in:
parent
939142786e
commit
5b34cb7eee
|
@ -443,7 +443,7 @@ func (p *PermissionCtrl) populateInitPermission() error {
|
|||
if tx && !p.permissionedMode {
|
||||
// Network is initialized with permissions and node is joining in a non-permissioned
|
||||
// option. stop the node from coming up
|
||||
utils.Fatalf("Joining a permissioned network in non-permissioned mode. Bring up get with --permissioned.")
|
||||
utils.Fatalf("Joining a permissioned network in non-permissioned mode. Bring up geth with --permissioned.")
|
||||
}
|
||||
|
||||
if !p.permissionedMode {
|
||||
|
|
|
@ -219,6 +219,11 @@ func (s *PermissionAPI) PermissionAccountList() []accountInfo {
|
|||
}
|
||||
|
||||
func (s *PermissionAPI) VoterList() []string {
|
||||
if !s.enabled {
|
||||
voterArr := make([]string, 1)
|
||||
voterArr[0] = "Permissions control not enabled for the network"
|
||||
return voterArr
|
||||
}
|
||||
ps := s.newPermSessionWithNodeKeySigner()
|
||||
// get the total number of accounts with permissions
|
||||
voterCnt, err := ps.GetNumberOfVoters()
|
||||
|
|
Loading…
Reference in New Issue