Skip to content

Instantly share code, notes, and snippets.

Diego Pino dpino

Block or report user

Report or block dpino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dpino
dpino / snakecoin-server-full-code.py
Last active Jan 4, 2019 — forked from aunyks/snakecoin-server-full-code.py
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
View snakecoin-server-full-code.py
#!/usr/bin/env python
# Source https://gist.github.com/aunyks/47d157f8bc7d1829a729c2a6a919c173
# Modifications:
# - Can pass port number as command line argument.
# - Added GET method /add_peer.
# - On retrieving blockchain, call consensus to synchronize with other peers.
# - On updating the current blockchain from a peers' blockchain, convert list
# of JSON blocks to native Block objects.
You can’t perform that action at this time.