hive-engine / steemsmartcontracts

MIT License
20 stars 23 forks source link

Add IPv6 Support For Witnesses #147

Closed Rishi556 closed 2 years ago

Rishi556 commented 2 years ago

Currently witnesses don't have the ability to communicate with IPv6 witnesses due to malformed URL.

2022-06-27 23:16:22 error: [P2P] Error posting to h-e / round 747286 / Error: connect ENETUNREACH 0.0.10.42:5001
2022-06-28 00:03:05 info: [P2P] http://2602:fb95:1::3:5001/p2p

The proper form is to add []'s around the v6 address to signify that it's a v6 address and not a port. This does that. @4Ykw found the issue.

4Ykw commented 2 years ago

I have also tested this on the light node (http://[2407:7000:9cb7:b800:d9d3:d7c:db4b:a7cd]:5010) and produced blocks without errors for some days already. Note: The version will still appear as 1.7.3 because I didn't change that part.