Skip to content

Commit

Permalink
Merge pull request #558 from bnb-chain/develop
Browse files Browse the repository at this point in the history
fix: permission package type mismatch
  • Loading branch information
cosinlink authored Jan 11, 2024
2 parents 6fe1b63 + fa17b52 commit 65430fa
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Bugfixes:
Chore:
* [#551](https://github.com/bnb-chain/greenfield/pull/551) chore: fix typo and update doc

## v1.2.2
This release introduces the Manchurian upgrade to the mainnet.

## v1.2.1
This release fixes the bugs within resource tags.

Expand Down
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/crosschain.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const (
OperationUpdateGroupMember uint8 = 4

// permission operation types
OperationCreatePolicy uint8 = 1
OperationDeletePolicy uint8 = 2
OperationCreatePolicy uint8 = 2
OperationDeletePolicy uint8 = 3
)

func SafeBigInt(input *big.Int) *big.Int {
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 65430fa

Please sign in to comment.