Skip to content

Commit

Permalink
Temporarily disable consensus address checks at genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjgilbert committed Jan 14, 2020
1 parent f059460 commit e9730bf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions go/registry/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,16 @@ func VerifyRegisterNodeArgs( // nolint: gocyclo
return nil, ErrInvalidArgument
}
consensusAddressRequired := n.HasRoles(ConsensusAddressRequiredRoles)
if err := verifyAddresses(params, consensusAddressRequired, n.Consensus.Addresses); err != nil {
addrs, _ := json.Marshal(n.Consensus.Addresses)
logger.Error("RegisterNode: missing/invalid consensus addresses",
"node", n,
"consensus_addrs", addrs,
)
return nil, err
if !isGenesis {
// Temporarily allow invalid consensus addresses at genesis
if err := verifyAddresses(params, consensusAddressRequired, n.Consensus.Addresses); err != nil {
addrs, _ := json.Marshal(n.Consensus.Addresses)
logger.Error("RegisterNode: missing/invalid consensus addresses",
"node", n,
"consensus_addrs", addrs,
)
return nil, err
}
}

// If node is a key manager, ensure that it is owned by the key manager
Expand Down

0 comments on commit e9730bf

Please sign in to comment.