Skip to content

Instantly share code, notes, and snippets.

Last active March 31, 2021 18:16
What would you like to do?
Step 10: Registering Nodes
from urllib.parse import urlparse
class Blockchain(object):
def __init__(self):
self.nodes = set()
def register_node(self, address):
Add a new node to the list of nodes
:param address: <str> Address of node. Eg. ''
:return: None
parsed_url = urlparse(address)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment