Skip to content

Commit

Permalink
Use derivation for group acc addr
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Dec 9, 2021
1 parent f911eda commit 81dd664
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/group/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ func (k Keeper) CreateGroupAccount(goCtx context.Context, req *group.MsgCreateGr
var buf = make([]byte, 8)
binary.BigEndian.PutUint64(buf, nextAccVal)

accountAddr = address.Module(group.ModuleName, buf)
parentAcc := address.Module(group.ModuleName, []byte{GroupAccountTablePrefix})
accountAddr = address.Derive(parentAcc, buf)

if k.accKeeper.GetAccount(ctx, accountAddr) != nil {
// handle a rare collision
Expand Down

0 comments on commit 81dd664

Please sign in to comment.