Skip to content

Commit

Permalink
Merge branch 'fix/issue#34' into audit-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
p0p3yee committed Jul 11, 2023
2 parents ac47c8d + a86d001 commit 406cb40
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 28 deletions.
2 changes: 2 additions & 0 deletions proto/fairyring/keyshare/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ message MsgSendKeyshareResponse {
uint64 keyshareIndex = 4;
uint64 blockHeight = 5;
uint64 receivedBlockHeight = 6;
bool success = 7;
string errorMessage = 8;
}


Expand Down
4 changes: 4 additions & 0 deletions x/keyshare/keeper/msg_server_send_keyshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar
KeyshareIndex: msg.KeyShareIndex,
ReceivedBlockHeight: uint64(ctx.BlockHeight()),
BlockHeight: msg.BlockHeight,
Success: false,
ErrorMessage: "Invalid KeyShare",
}, nil
}

Expand Down Expand Up @@ -129,6 +131,7 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar
KeyshareIndex: msg.KeyShareIndex,
ReceivedBlockHeight: uint64(ctx.BlockHeight()),
BlockHeight: msg.BlockHeight,
Success: true,
}, nil
}

Expand Down Expand Up @@ -192,6 +195,7 @@ func (k msgServer) SendKeyshare(goCtx context.Context, msg *types.MsgSendKeyshar
KeyshareIndex: msg.KeyShareIndex,
ReceivedBlockHeight: uint64(ctx.BlockHeight()),
BlockHeight: msg.BlockHeight,
Success: true,
}, nil
}

Expand Down
150 changes: 122 additions & 28 deletions x/keyshare/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 406cb40

Please sign in to comment.