Skip to content

Commit

Permalink
go/oasis-node/cmd/common: ExportEntity should use the entity ctor
Browse files Browse the repository at this point in the history
Instead of using an entity populated with the zero values and a manually
filled in public key, use the entity constructor that can fill in
sensible values for things like the version.
  • Loading branch information
Yawning committed Jul 20, 2020
1 parent 34caaad commit b3a41e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/oasis-node/cmd/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func ExportEntity(signerBackend, entityDir string) error {
if err != nil {
return err
}
var entity entity.Entity
entity.ID = signer.Public()
return entity.Save(entityDir)

_, err = entity.GenerateWithSigner(entityDir, signer, nil)
return err
}

0 comments on commit b3a41e3

Please sign in to comment.