Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new RPC method for block #79

Merged
merged 4 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/domain/block/block_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,8 @@ func (i *impl) ListBlocks(req *biz.ListBlocksRequest, stream grpc.ServerStreamin

return nil
}

func (i *impl) FoundNewBlockNonStream(c context.Context, req *biz.FoundNewBlockRequest) (*model.Block, error) {
// TODO: 2024/10/5|sean|implement me
panic("implement me")
}
8 changes: 8 additions & 0 deletions app/domain/transaction/transaction_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,11 @@ func (i *txService) ListTransactionsByAccount(

return nil
}

func (i *txService) ProcessBlockTransactionsNonStream(
block *model.Block,
stream grpc.ServerStreamingServer[txM.Transaction],
) error {
// TODO: 2024/10/5|sean|implement me
panic("implement me")
}
57 changes: 32 additions & 25 deletions entity/domain/block/biz/block.pb.go

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

1 change: 1 addition & 0 deletions entity/domain/block/biz/block.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ message ListBlocksRequest {
service BlockService {
rpc ScanBlock(ScanBlockRequest) returns (stream Block) {}
rpc FoundNewBlock(stream Block) returns (stream Block) {}
rpc FoundNewBlockNonStream(FoundNewBlockRequest) returns (Block) {}

rpc GetBlock(GetBlockRequest) returns (Block) {}
rpc ListBlocks(ListBlocksRequest) returns (stream Block) {}
Expand Down
46 changes: 42 additions & 4 deletions entity/domain/block/biz/block_grpc.pb.go

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

35 changes: 35 additions & 0 deletions entity/domain/block/biz/block_grpc_mock.pb.go

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

Loading
Loading