// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v5.26.1
// source: hashdb.proto

package hashdb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// HashDBServiceClient is the client API for HashDBService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type HashDBServiceClient interface {
	GetLatestStateRoot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestStateRootResponse, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	SetProgram(ctx context.Context, in *SetProgramRequest, opts ...grpc.CallOption) (*SetProgramResponse, error)
	GetProgram(ctx context.Context, in *GetProgramRequest, opts ...grpc.CallOption) (*GetProgramResponse, error)
	LoadDB(ctx context.Context, in *LoadDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	LoadProgramDB(ctx context.Context, in *LoadProgramDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	FinishTx(ctx context.Context, in *FinishTxRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	StartBlock(ctx context.Context, in *StartBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	FinishBlock(ctx context.Context, in *FinishBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error)
	GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error)
	GetFlushData(ctx context.Context, in *GetFlushDataRequest, opts ...grpc.CallOption) (*GetFlushDataResponse, error)
	ConsolidateState(ctx context.Context, in *ConsolidateStateRequest, opts ...grpc.CallOption) (*ConsolidateStateResponse, error)
	Purge(ctx context.Context, in *PurgeRequest, opts ...grpc.CallOption) (*PurgeResponse, error)
	ReadTree(ctx context.Context, in *ReadTreeRequest, opts ...grpc.CallOption) (*ReadTreeResponse, error)
	CancelBatch(ctx context.Context, in *CancelBatchRequest, opts ...grpc.CallOption) (*CancelBatchResponse, error)
	ResetDB(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ResetDBResponse, error)
}

type hashDBServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewHashDBServiceClient(cc grpc.ClientConnInterface) HashDBServiceClient {
	return &hashDBServiceClient{cc}
}

func (c *hashDBServiceClient) GetLatestStateRoot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLatestStateRootResponse, error) {
	out := new(GetLatestStateRootResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetLatestStateRoot", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error) {
	out := new(SetResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Set", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
	out := new(GetResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) SetProgram(ctx context.Context, in *SetProgramRequest, opts ...grpc.CallOption) (*SetProgramResponse, error) {
	out := new(SetProgramResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/SetProgram", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) GetProgram(ctx context.Context, in *GetProgramRequest, opts ...grpc.CallOption) (*GetProgramResponse, error) {
	out := new(GetProgramResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetProgram", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) LoadDB(ctx context.Context, in *LoadDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/LoadDB", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) LoadProgramDB(ctx context.Context, in *LoadProgramDBRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/LoadProgramDB", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) FinishTx(ctx context.Context, in *FinishTxRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/FinishTx", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) StartBlock(ctx context.Context, in *StartBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/StartBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) FinishBlock(ctx context.Context, in *FinishBlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/FinishBlock", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) Flush(ctx context.Context, in *FlushRequest, opts ...grpc.CallOption) (*FlushResponse, error) {
	out := new(FlushResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Flush", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) GetFlushStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetFlushStatusResponse, error) {
	out := new(GetFlushStatusResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetFlushStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) GetFlushData(ctx context.Context, in *GetFlushDataRequest, opts ...grpc.CallOption) (*GetFlushDataResponse, error) {
	out := new(GetFlushDataResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/GetFlushData", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) ConsolidateState(ctx context.Context, in *ConsolidateStateRequest, opts ...grpc.CallOption) (*ConsolidateStateResponse, error) {
	out := new(ConsolidateStateResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/ConsolidateState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) Purge(ctx context.Context, in *PurgeRequest, opts ...grpc.CallOption) (*PurgeResponse, error) {
	out := new(PurgeResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/Purge", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) ReadTree(ctx context.Context, in *ReadTreeRequest, opts ...grpc.CallOption) (*ReadTreeResponse, error) {
	out := new(ReadTreeResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/ReadTree", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) CancelBatch(ctx context.Context, in *CancelBatchRequest, opts ...grpc.CallOption) (*CancelBatchResponse, error) {
	out := new(CancelBatchResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/CancelBatch", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *hashDBServiceClient) ResetDB(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ResetDBResponse, error) {
	out := new(ResetDBResponse)
	err := c.cc.Invoke(ctx, "/hashdb.v1.HashDBService/ResetDB", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// HashDBServiceServer is the server API for HashDBService service.
// All implementations must embed UnimplementedHashDBServiceServer
// for forward compatibility
type HashDBServiceServer interface {
	GetLatestStateRoot(context.Context, *emptypb.Empty) (*GetLatestStateRootResponse, error)
	Set(context.Context, *SetRequest) (*SetResponse, error)
	Get(context.Context, *GetRequest) (*GetResponse, error)
	SetProgram(context.Context, *SetProgramRequest) (*SetProgramResponse, error)
	GetProgram(context.Context, *GetProgramRequest) (*GetProgramResponse, error)
	LoadDB(context.Context, *LoadDBRequest) (*emptypb.Empty, error)
	LoadProgramDB(context.Context, *LoadProgramDBRequest) (*emptypb.Empty, error)
	FinishTx(context.Context, *FinishTxRequest) (*emptypb.Empty, error)
	StartBlock(context.Context, *StartBlockRequest) (*emptypb.Empty, error)
	FinishBlock(context.Context, *FinishBlockRequest) (*emptypb.Empty, error)
	Flush(context.Context, *FlushRequest) (*FlushResponse, error)
	GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error)
	GetFlushData(context.Context, *GetFlushDataRequest) (*GetFlushDataResponse, error)
	ConsolidateState(context.Context, *ConsolidateStateRequest) (*ConsolidateStateResponse, error)
	Purge(context.Context, *PurgeRequest) (*PurgeResponse, error)
	ReadTree(context.Context, *ReadTreeRequest) (*ReadTreeResponse, error)
	CancelBatch(context.Context, *CancelBatchRequest) (*CancelBatchResponse, error)
	ResetDB(context.Context, *emptypb.Empty) (*ResetDBResponse, error)
	mustEmbedUnimplementedHashDBServiceServer()
}

// UnimplementedHashDBServiceServer must be embedded to have forward compatible implementations.
type UnimplementedHashDBServiceServer struct {
}

func (UnimplementedHashDBServiceServer) GetLatestStateRoot(context.Context, *emptypb.Empty) (*GetLatestStateRootResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLatestStateRoot not implemented")
}
func (UnimplementedHashDBServiceServer) Set(context.Context, *SetRequest) (*SetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedHashDBServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedHashDBServiceServer) SetProgram(context.Context, *SetProgramRequest) (*SetProgramResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SetProgram not implemented")
}
func (UnimplementedHashDBServiceServer) GetProgram(context.Context, *GetProgramRequest) (*GetProgramResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetProgram not implemented")
}
func (UnimplementedHashDBServiceServer) LoadDB(context.Context, *LoadDBRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LoadDB not implemented")
}
func (UnimplementedHashDBServiceServer) LoadProgramDB(context.Context, *LoadProgramDBRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LoadProgramDB not implemented")
}
func (UnimplementedHashDBServiceServer) FinishTx(context.Context, *FinishTxRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FinishTx not implemented")
}
func (UnimplementedHashDBServiceServer) StartBlock(context.Context, *StartBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StartBlock not implemented")
}
func (UnimplementedHashDBServiceServer) FinishBlock(context.Context, *FinishBlockRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method FinishBlock not implemented")
}
func (UnimplementedHashDBServiceServer) Flush(context.Context, *FlushRequest) (*FlushResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Flush not implemented")
}
func (UnimplementedHashDBServiceServer) GetFlushStatus(context.Context, *emptypb.Empty) (*GetFlushStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetFlushStatus not implemented")
}
func (UnimplementedHashDBServiceServer) GetFlushData(context.Context, *GetFlushDataRequest) (*GetFlushDataResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetFlushData not implemented")
}
func (UnimplementedHashDBServiceServer) ConsolidateState(context.Context, *ConsolidateStateRequest) (*ConsolidateStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConsolidateState not implemented")
}
func (UnimplementedHashDBServiceServer) Purge(context.Context, *PurgeRequest) (*PurgeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Purge not implemented")
}
func (UnimplementedHashDBServiceServer) ReadTree(context.Context, *ReadTreeRequest) (*ReadTreeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ReadTree not implemented")
}
func (UnimplementedHashDBServiceServer) CancelBatch(context.Context, *CancelBatchRequest) (*CancelBatchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CancelBatch not implemented")
}
func (UnimplementedHashDBServiceServer) ResetDB(context.Context, *emptypb.Empty) (*ResetDBResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ResetDB not implemented")
}
func (UnimplementedHashDBServiceServer) mustEmbedUnimplementedHashDBServiceServer() {}

// UnsafeHashDBServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HashDBServiceServer will
// result in compilation errors.
type UnsafeHashDBServiceServer interface {
	mustEmbedUnimplementedHashDBServiceServer()
}

func RegisterHashDBServiceServer(s grpc.ServiceRegistrar, srv HashDBServiceServer) {
	s.RegisterService(&HashDBService_ServiceDesc, srv)
}

func _HashDBService_GetLatestStateRoot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).GetLatestStateRoot(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/GetLatestStateRoot",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).GetLatestStateRoot(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/Set",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).Set(ctx, req.(*SetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).Get(ctx, req.(*GetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_SetProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetProgramRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).SetProgram(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/SetProgram",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).SetProgram(ctx, req.(*SetProgramRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_GetProgram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetProgramRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).GetProgram(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/GetProgram",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).GetProgram(ctx, req.(*GetProgramRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_LoadDB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoadDBRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).LoadDB(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/LoadDB",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).LoadDB(ctx, req.(*LoadDBRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_LoadProgramDB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoadProgramDBRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).LoadProgramDB(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/LoadProgramDB",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).LoadProgramDB(ctx, req.(*LoadProgramDBRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_FinishTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FinishTxRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).FinishTx(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/FinishTx",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).FinishTx(ctx, req.(*FinishTxRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_StartBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StartBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).StartBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/StartBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).StartBlock(ctx, req.(*StartBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_FinishBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FinishBlockRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).FinishBlock(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/FinishBlock",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).FinishBlock(ctx, req.(*FinishBlockRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_Flush_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(FlushRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).Flush(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/Flush",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).Flush(ctx, req.(*FlushRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_GetFlushStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).GetFlushStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/GetFlushStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).GetFlushStatus(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_GetFlushData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetFlushDataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).GetFlushData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/GetFlushData",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).GetFlushData(ctx, req.(*GetFlushDataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_ConsolidateState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ConsolidateStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).ConsolidateState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/ConsolidateState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).ConsolidateState(ctx, req.(*ConsolidateStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_Purge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PurgeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).Purge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/Purge",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).Purge(ctx, req.(*PurgeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_ReadTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadTreeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).ReadTree(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/ReadTree",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).ReadTree(ctx, req.(*ReadTreeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_CancelBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CancelBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).CancelBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/CancelBatch",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).CancelBatch(ctx, req.(*CancelBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _HashDBService_ResetDB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(HashDBServiceServer).ResetDB(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/hashdb.v1.HashDBService/ResetDB",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(HashDBServiceServer).ResetDB(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// HashDBService_ServiceDesc is the grpc.ServiceDesc for HashDBService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var HashDBService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hashdb.v1.HashDBService",
	HandlerType: (*HashDBServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLatestStateRoot",
			Handler:    _HashDBService_GetLatestStateRoot_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _HashDBService_Set_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _HashDBService_Get_Handler,
		},
		{
			MethodName: "SetProgram",
			Handler:    _HashDBService_SetProgram_Handler,
		},
		{
			MethodName: "GetProgram",
			Handler:    _HashDBService_GetProgram_Handler,
		},
		{
			MethodName: "LoadDB",
			Handler:    _HashDBService_LoadDB_Handler,
		},
		{
			MethodName: "LoadProgramDB",
			Handler:    _HashDBService_LoadProgramDB_Handler,
		},
		{
			MethodName: "FinishTx",
			Handler:    _HashDBService_FinishTx_Handler,
		},
		{
			MethodName: "StartBlock",
			Handler:    _HashDBService_StartBlock_Handler,
		},
		{
			MethodName: "FinishBlock",
			Handler:    _HashDBService_FinishBlock_Handler,
		},
		{
			MethodName: "Flush",
			Handler:    _HashDBService_Flush_Handler,
		},
		{
			MethodName: "GetFlushStatus",
			Handler:    _HashDBService_GetFlushStatus_Handler,
		},
		{
			MethodName: "GetFlushData",
			Handler:    _HashDBService_GetFlushData_Handler,
		},
		{
			MethodName: "ConsolidateState",
			Handler:    _HashDBService_ConsolidateState_Handler,
		},
		{
			MethodName: "Purge",
			Handler:    _HashDBService_Purge_Handler,
		},
		{
			MethodName: "ReadTree",
			Handler:    _HashDBService_ReadTree_Handler,
		},
		{
			MethodName: "CancelBatch",
			Handler:    _HashDBService_CancelBatch_Handler,
		},
		{
			MethodName: "ResetDB",
			Handler:    _HashDBService_ResetDB_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "hashdb.proto",
}
