Skip to content

Commit

Permalink
Merge pull request #3117 from oasisprotocol/yawning/fix/trivial
Browse files Browse the repository at this point in the history
go/oasis-node/cmd/common: ExportEntity should use the entity ctor
  • Loading branch information
Yawning authored Jul 20, 2020
2 parents 224d9cf + 4cea752 commit b176b1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changelog/3117.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
go/oasis-node/cmd/common: ExportEntity should use the entity ctor

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.
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 b176b1f

Please sign in to comment.