Skip to content

Commit

Permalink
chore: fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: closeobserve <[email protected]>
  • Loading branch information
closeobserve authored and Zhangguiguang committed Jul 26, 2024
1 parent c320810 commit 26bde0b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SuiStake.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var state = chain.GetValidatorState()
print(state.Epoch/TotalStaked/TotalRewards)
print("validator list = ", state.Validators)

// show validator infomation.
// show validator information.
var validator = state.Validators[idx]
print(validator.Name/Address/ImageUrl/APY ....)
```
Expand Down
2 changes: 1 addition & 1 deletion core/cosmos/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return hexTypes.HexEncodeToString(a.privKey.Bytes()), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
return a.privKey.PubKey().Bytes()
Expand Down
6 changes: 3 additions & 3 deletions core/cosmos/address_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if priKey.Equals(account.privKey) {
t.Log("private key restore success!!")
} else {
t.Fatal("private key resotre failured.")
t.Fatal("private key restore failured.")
}

t.Log("============================")
Expand All @@ -90,7 +90,7 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if pubKey.Equals(account.privKey.PubKey()) {
t.Log("public key restore success!!")
} else {
t.Fatal("public key resotre failured.")
t.Fatal("public key restore failured.")
}

t.Log("============================")
Expand All @@ -99,6 +99,6 @@ func TestPrivatePublicKeyDataAndStringTransform(t *testing.T) {
if accAddress.Equals(originAddress) {
t.Log("address key restore success!!")
} else {
t.Fatal("address key resotre failured.")
t.Fatal("address key restore failured.")
}
}
2 changes: 1 addition & 1 deletion core/eth/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return types.HexEncodeToString(bytes), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
return crypto.FromECDSAPub(&a.privateKeyECDSA.PublicKey)
Expand Down
2 changes: 1 addition & 1 deletion core/eth/chainManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func GetConnection(rpcUrl string) (*EthChain, error) {
return getConnectionWithTimeout(rpcUrl, 0)
}

// @param timeout time unit millsecond, zero instead use default.
// @param timeout time unit millisecond, zero instead use default.
func getConnectionWithTimeout(rpcUrl string, timeout int64) (*EthChain, error) {
chain, ok := chainConnections[rpcUrl]
if ok {
Expand Down
2 changes: 1 addition & 1 deletion core/eth/ethchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (e *EthChain) CreateRemote(rpcUrl string) (chain *EthChain, err error) {
return e.CreateRemoteWithTimeout(rpcUrl, 0)
}

// @param timeout time unit millsecond. 0 means use chain's default: 60000ms.
// @param timeout time unit millisecond. 0 means use chain's default: 60000ms.
func (e *EthChain) CreateRemoteWithTimeout(rpcUrl string, timeout int64) (chain *EthChain, err error) {
defer base.CatchPanicAndMapToBasicError(&err)

Expand Down
2 changes: 1 addition & 1 deletion core/starknet/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (a *Account) PrivateKeyHex() (string, error) {
return hexTypes.HexEncodeToString(a.privateKey.Bytes()), nil
}

// Is deocde from address
// Is decode from address
// @return publicKey data
func (a *Account) PublicKey() []byte {
pub, _, err := curve.Curve.PrivateToPoint(a.privateKey)
Expand Down

0 comments on commit 26bde0b

Please sign in to comment.