MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / __getattr__

Method __getattr__

test/functional/test_framework/test_node.py:238–244  ·  view source on GitHub ↗

Dispatches any unrecognised messages to the RPC connection or a CLI instance.

(self, name)

Source from the content-addressed store, hash-verified

236 self.process.kill()
237
238 def __getattr__(self, name):
239 """Dispatches any unrecognised messages to the RPC connection or a CLI instance."""
240 if self.use_cli:
241 return getattr(self.cli, name)
242 else:
243 assert self.rpc_connected and self._rpc is not None, self._node_msg("Error: no RPC connection")
244 return getattr(self._rpc, name)
245
246 def start(self, extra_args=None, *, cwd=None, stdout=None, stderr=None, env=None, **kwargs):
247 """Start the node."""

Callers 4

generateblockMethod · 0.95
generatetoaddressMethod · 0.95
generatetodescriptorMethod · 0.95
setmocktimeMethod · 0.95

Calls 1

_node_msgMethod · 0.95

Tested by

no test coverage detected