Skip to content

Commit

Permalink
chore: fix typo and update doc (bnb-chain#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 authored and alexgao001 committed Jan 12, 2024
1 parent 6fe1b63 commit 0e1197c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ Refer to the [docs](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfi

- [Interacting with the Node](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node/interact-node)
- [Run Local Network](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node/run-local-network)
- [Run Testnet Node](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node/run-testnet-node)
- [Become Testnet Validator](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node/become-testnet-validator)
- [Run Node](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node)
- [Become Validator](https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/run-node/become-validator)

## Related Projects
- [Greenfield-Contract](https://github.com/bnb-chain/greenfield-contracts): the cross chain contract for Greenfield that deployed on BSC network.
Expand Down
7 changes: 3 additions & 4 deletions x/permission/types/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ import (
)

func TestParsePolicyIdFromQueueKey(t *testing.T) {
policyIds := []math.Uint{math.NewUint(rand.Uint64()), math.NewUint(rand.Uint64()), math.NewUint(rand.Uint64())}

expiration := time.Now()
for _, policyId := range policyIds {
for i := 0; i < 100; i++ {
expiration := time.Now().Add(time.Duration(rand.Int63()))
policyId := math.NewUint(rand.Uint64())
key := PolicyPrefixQueue(&expiration, policyId.Bytes())
recoverId := ParsePolicyIdFromQueueKey(key)
if !recoverId.Equal(policyId) {
Expand Down
4 changes: 2 additions & 2 deletions x/storage/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ var (

// GetBucketKey return the bucket name store key
func GetBucketKey(bucketName string) []byte {
objectNameHash := sdk.Keccak256([]byte(bucketName))
return append(BucketInfoPrefix, objectNameHash...)
bucketNameHash := sdk.Keccak256([]byte(bucketName))
return append(BucketInfoPrefix, bucketNameHash...)
}

// GetObjectKey return the object name store key
Expand Down

0 comments on commit 0e1197c

Please sign in to comment.