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

nodes/resolve #215

Open
sfz009900 opened this issue Jan 2, 2022 · 9 comments
Open

nodes/resolve #215

sfz009900 opened this issue Jan 2, 2022 · 9 comments

Comments

@sfz009900
Copy link

Excuse me, I first set up 127.0.0.1:5001, then called mine 6 times,
and called /transactions/new several times in the second time to get the following block:

{
  "index": 2, 
  "previous_hash": "5d988208db5c04a5b35e1fc32103a9bc32e884ecc70c639a53b9b2ebfbe8ad1b", 
  "proof": 43434, 
  "timestamp": 1641113376.5464342, 
  "transactions": [
    {
      "amount": 5, 
      "recipient": "someone-other-address", 
      "sender": "d4ee26eee15148ee92c6cd394edd974e"
    }, 
    {
      "amount": 5, 
      "recipient": "someone-other-address", 
      "sender": "d4ee26eee15148ee92c6cd394edd974e"
    }, 
    {
      "amount": 5, 
      "recipient": "someone-other-address", 
      "sender": "d4ee26eee15148ee92c6cd394edd974e"
    }, 
    {
      "amount": 1, 
      "recipient": "419a3b3ff4024513bedbce5316f45179", 
      "sender": "0"
    }
  ]
}

Then I created a new node 127.0.0.1:5001, added it to 127.0.0.1:5000 with /nodes/register,
and called 127.0.0.1:5001/mine to get 18 blocks ,
and then call 127.0.0.1:5000 / nodes/resolve,
it will determine 18 block is greater than 6 block,
and update the current chains to 127.0.0.1:5001 chains,
so my original chains in the second block of trans Wouldn't actions be incorrect?

@MoH-MuRRa
Copy link

How were you able to do actions from other ports?
For example if you run the program using the port 5000, then how could you mine, get chain, etc using other ports. When I add a new node (5001 for example) and try to get the chain from that node (50001/chain) i get an error

@sfz009900
Copy link
Author

How were you able to do actions from other ports? For example if you run the program using the port 5000, then how could you mine, get chain, etc using other ports. When I add a new node (5001 for example) and try to get the chain from that node (50001/chain) i get an error

You need to run two copies of blockchain.py, the first with a default port and the second with --port 5001

@MoH-MuRRa
Copy link

MoH-MuRRa commented Jan 2, 2022 via email

@sfz009900
Copy link
Author

How can this be done? Isn't the program supposed to stop and run again with the new specified port. Hope that you can mention specific details bro. I'm using vs code. Thanks in advance.

On Sun, 2 Jan 2022, 7:47 pm sfz009900, @.> wrote: How were you able to do actions from other ports? For example if you run the program using the port 5000, then how could you mine, get chain, etc using other ports. When I add a new node (5001 for example) and try to get the chain from that node (50001/chain) i get an error You need to run two copies of blockchain.py, the first with a default port and the second with --port 5001 — Reply to this email directly, view it on GitHub <#215 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWAZXLHP3YXRNS4RXGV7ZDUUCFUZANCNFSM5LDPU4YQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.>

Vs I don't know, but for Python, it is possible to open both CMD's at the same time and run python36 blockchain.py and python36 blockchain.py respectively --port 5001

@MoH-MuRRa
Copy link

MoH-MuRRa commented Jan 2, 2022 via email

@sfz009900
Copy link
Author

Can you help me bro and send a screenshot on how this can be done? It would be much appreciated :)

On Sun, 2 Jan 2022, 8:10 pm sfz009900, @.> wrote: How can this be done? Isn't the program supposed to stop and run again with the new specified port. Hope that you can mention specific details bro. I'm using vs code. Thanks in advance. … <#m_-7920858052792816002_> On Sun, 2 Jan 2022, 7:47 pm sfz009900, @.> wrote: How were you able to do actions from other ports? For example if you run the program using the port 5000, then how could you mine, get chain, etc using other ports. When I add a new node (5001 for example) and try to get the chain from that node (50001/chain) i get an error You need to run two copies of blockchain.py, the first with a default port and the second with --port 5001 — Reply to this email directly, view it on GitHub <#215 (comment) <#215 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWAZXLHP3YXRNS4RXGV7ZDUUCFUZANCNFSM5LDPU4YQ https://github.com/notifications/unsubscribe-auth/AWWAZXLHP3YXRNS4RXGV7ZDUUCFUZANCNFSM5LDPU4YQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.andro
QQ图片20220103022010
id&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.
> Vs I don't know, but for Python, it is possible to open both CMD's at the same time and run python36 blockchain.py and python36 blockchain.py respectively --port 5001 — Reply to this email directly, view it on GitHub <#215 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWWAZXLNKXNUXQVQ2D2UI3DUUCIIRANCNFSM5LDPU4YQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.Message ID: @.
**>

@MoH-MuRRa
Copy link

MoH-MuRRa commented Jan 2, 2022 via email

@MoH-MuRRa
Copy link

MoH-MuRRa commented Jan 3, 2022 via email

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

3 participants
@sfz009900 @MoH-MuRRa and others