Skip to content

Commit

Permalink
doc(core): Add docs to explain why lazy construction of signer
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed Apr 17, 2024
1 parent 24b8b2f commit dcdf21b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions state/core_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,9 @@ func (ca *CoreAccessor) queryMinimumGasPrice(
return coins.AmountOf(app.BondDenom).MustFloat64(), nil
}

// getSigner returns the signer if it has already been constructed, otherwise
// it will attempt to set it up. The signer can only be constructed if the account
// exists / is funded.
func (ca *CoreAccessor) getSigner(ctx context.Context) (*user.Signer, error) {
ca.signerMu.Lock()
defer ca.signerMu.Unlock()
Expand Down

0 comments on commit dcdf21b

Please sign in to comment.