Skip to content

Instantly share code, notes, and snippets.

@aakilfernandes
Created August 24, 2016 18:28
Show Gist options
  • Save aakilfernandes/9150026a58c96c850ffa0d6b02d65ba5 to your computer and use it in GitHub Desktop.
Save aakilfernandes/9150026a58c96c850ffa0d6b02d65ba5 to your computer and use it in GitHub Desktop.
var peerEnode = 'enode://739b275e0d6d895aad6f88dba61850d58cc90a0b3c1f05f8564707fb90a98310696f3e7ac15a51486a0582a1bebc403aa0a02ad8230c2614f33d9665311a0069@40.117.36.75:30303'
console.log('Adding peer with enode',peerEnode)
admin.addPeer(peerEnode)
var interval = setInterval(function(){
if(!admin.peers || admin.peers.length === 0){
console.log('Waiting to connect...')
return
}
console.log('Connected to peer',admin.peers[0].id)
clearInterval(interval)
//setTimeout(function(){}, 100000000000000000000000)
},1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment