MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / _batch

Method _batch

bitcoin/rpc.py:262–275  ·  view source on GitHub ↗
(self, rpc_call_list)

Source from the content-addressed store, hash-verified

260 return response['result']
261
262 def _batch(self, rpc_call_list):
263 postdata = json.dumps(list(rpc_call_list))
264
265 headers = {
266 'Host': self.__url.hostname,
267 'User-Agent': DEFAULT_USER_AGENT,
268 'Content-type': 'application/json',
269 }
270
271 if self.__auth_header is not None:
272 headers['Authorization'] = self.__auth_header
273
274 self.__conn.request('POST', self.__url.path, postdata, headers)
275 return self._get_response()
276
277 def _get_response(self):
278 http_response = self.__conn.getresponse()

Callers

nothing calls this directly

Calls 1

_get_responseMethod · 0.95

Tested by

no test coverage detected