Skip to content

Commit

Permalink
revise more error message
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Nov 7, 2023
1 parent a383900 commit c32cace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/observer/keeper/msg_server_add_block_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH

_, found = k.GetBlockHeader(ctx, msg.BlockHash)
if found {
return nil, cosmoserrors.Wrap(types.ErrBlockAlreadyExist, msg.BlockHash)
return nil, cosmoserrors.Wrap(types.ErrBlockAlreadyExist, fmt.Sprintf("block hash: %x", msg.BlockHash))
}

bhs, found := k.Keeper.GetBlockHeaderState(ctx, msg.ChainId)
Expand All @@ -45,7 +45,7 @@ func (k msgServer) AddBlockHeader(goCtx context.Context, msg *types.MsgAddBlockH
if err != nil {
return nil, cosmoserrors.Wrap(types.ErrNoParentHash, err.Error())
}
_, found = k.GetBlockHeader(ctx, phash)
_, found = k.GetBlockHeader(ctx, pHash)
if !found {
return nil, cosmoserrors.Wrap(types.ErrNoParentHash, "parent block header not found")
}
Expand Down

0 comments on commit c32cace

Please sign in to comment.