MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / __call__

Method __call__

test/functional/test_framework/authproxy.py:134–143  ·  view source on GitHub ↗
(self, *args, **argsn)

Source from the content-addressed store, hash-verified

132 'id': AuthServiceProxy.__id_count}
133
134 def __call__(self, *args, **argsn):
135 postdata = json.dumps(self.get_request(*args, **argsn), default=EncodeDecimal, ensure_ascii=self.ensure_ascii)
136 response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
137 if response['error'] is not None:
138 raise JSONRPCException(response['error'])
139 elif 'result' not in response:
140 raise JSONRPCException({
141 'code': -343, 'message': 'missing JSON-RPC result'})
142 else:
143 return response['result']
144
145 def batch(self, rpc_call_list):
146 postdata = json.dumps(list(rpc_call_list), default=EncodeDecimal, ensure_ascii=self.ensure_ascii)

Callers

nothing calls this directly

Calls 4

get_requestMethod · 0.95
_requestMethod · 0.95
JSONRPCExceptionClass · 0.85
encodeMethod · 0.80

Tested by

no test coverage detected