Skip to content
Permalink
Browse files
optimize: rm unused code
  • Loading branch information
DLive committed May 8, 2019
1 parent 0236bc8 commit 96d3874fab987f44dc847982a84650540bd4904a
Showing 4 changed files with 1 addition and 12 deletions.
@@ -26,7 +26,7 @@
-record(decoding_state,{type_pool = dict:new(), reference_pool = dict:new(),hash_pool = dict:new()}).

%---------------------------------------------------------------------------
% encode/2 <-- ** Entry **
% encode/2
%---------------------------------------------------------------------------

encode(undefined, _State) -> <<$N>>;
@@ -805,13 +805,6 @@ hash_lookup(Hash,#decoding_state{hash_pool = HashPool} = State) ->
{ok,TypeDef}->
TypeDef
end.
%% init(false),
%% case ets:lookup(hashes, Hash) of
%% [] ->
%% {not_found, Hash};
%% [{Hash,TypeDef}] ->
%% TypeDef
%% end.

hash_store(TypeDef = #type_def{defineNo = Hash}, #decoding_state{hash_pool = HashPool} = State) ->
%% init(false),
@@ -33,8 +33,6 @@ encode_request_data(Request)->


encode_request_data(dubbo_rpc_invocation,Request,Data,State) ->
%% METHOD_NAME = Data#dubbo_rpc_invocation.methodName,
%% METHOD_ARGS_TYPES = Data#dubbo_rpc_invocation.parameterDesc,
RequestList = [
%% jiffy:encode(?DUBBO_VERSION,[]),
string_encode(?DUBBO_VERSION),
@@ -35,7 +35,6 @@ init_per_suite(Config) ->
}),
Start = application:ensure_all_started(dubboerl),
%% dubboerl:init(),
%% dubbo_service_app:start(a,b),
dubboerl:start_provider(),
timer:sleep(2000),
dubboerl:start_consumer(),
@@ -23,7 +23,6 @@ object_test()->
native_type = de_TestReq,
fieldnames = record_info(fields,de_TestReq)},
EncodingState0 = type_encoding:enlist(TypeDefA),
%% ?debugFmt("state:~p~n",[EncodingState0]),
RequestArg0 = #de_TestReq{name = <<"nameinfo">>, nick = <<"nickname">> ,age=10 },

{Bin, State0} = cotton_hessian:encode(RequestArg0, EncodingState0),

0 comments on commit 96d3874

Please sign in to comment.