MCPcopy Create free account
hub / github.com/ElementsProject/elements / get_rpc_cookie

Function get_rpc_cookie

contrib/linearize/linearize-hashes.py:93–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 height += num_blocks
92
93def get_rpc_cookie():
94 # Open the cookie file
95 with open(os.path.join(os.path.expanduser(settings['datadir']), '.cookie'), 'r', encoding="ascii") as f:
96 combined = f.readline()
97 combined_split = combined.split(":")
98 settings['rpcuser'] = combined_split[0]
99 settings['rpcpassword'] = combined_split[1]
100
101if __name__ == '__main__':
102 if len(sys.argv) != 2:

Callers 1

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected