Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get to nodes to communicate on the same chain #89

Open
JimiPedros opened this issue Apr 6, 2018 · 3 comments
Open

Can't get to nodes to communicate on the same chain #89

JimiPedros opened this issue Apr 6, 2018 · 3 comments

Comments

@JimiPedros
Copy link

Hi there, when I try setup 2 nodes I cannot get them to operate on the same chain.

Does anyone have a solution to this?

@LiuFangLu
Copy link

change if not self.valid_proof(last_block['proof'], block['proof'], last_block['previous_hash']) to if not self.valid_proof(last_block['proof'], block['proof'], block['previous_hash']), try again

@LiuFangLu
Copy link

i have only one computer,so I create two ports 5000 and 5100 simulate two computer, copy the python file to two, change they port to 5000 and 5100,now we have two address(mine is http://127.0.0.1:5000/ and http://127.0.0.1:5100/) use /nodes/register api to register one address to anther address, now when you add new block, use /nodes/resolve api to synchronization the blockchain ,now you can see they use the same blockchain.

@alex-manutd
Copy link

I'm a bit wishy washy here still. If I set up two nodes, both running blockchain.py on the same LAN, and perform /transaction/new, /mine and /chain in both directions from both nodes both using Postman, when I register the nodes with each other then resolve, will the shorter chain and its contained blocks and transactions be discarded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@JimiPedros @alex-manutd @LiuFangLu and others