Git Product home page Git Product logo

bitboot's People

Contributors

bmuller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bitboot's Issues

how to connect the network

can you please tell me the both systems should run on different networks or same network(LAN)?
should i run both machines with the same magic name ?
what are the settings i have to do in my system?

not founding peers

if i ran the example.js file in my system it is not finding any peers
and moreover iam new to this technology

after ran the example.js file it was giving some log messages here:

bitboot function
Using rally point bitboot (f659ba883e49be3891deccd12b7c7bf96343bcad)
bootstrap function
Joining network with id f65902e716dca34fe8ed55b7a708225b7b5cbcad (distance to rally 1.6066485897541828e+43)
I have a new node id: f65902e716dca34fe8ed55b7a708225b7b5cbcad
onready function
search function
Searching for nodes near rally point
finished function
I found peers: []
Waddling closer to the rally point destroying old DHT connection
restart function
Joining network with id f659b2e716dca34fe8ed55b7a708225b7b5cbcad (distance to rally 7.34723573552025e+41)
I have a new node id: f659b2e716dca34fe8ed55b7a708225b7b5cbcad
onready function
sayhi function
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []
search function
Searching for nodes near rally point
finished function
I found peers: []

TypeError: Cannot read property 'id' of undefined

node -v
v11.14.0

yarn init -y
yarn add bitboot
nano index.js

// index.js

var Bitboot = require('bitboot')
 
// The rally point name can be any string and should be unique
// to your peer network
var bb = new Bitboot('bitboot test network')
 
// this is called whenever the node selects a new ID and rejoins
// the BitTorrent mainline DHT network
bb.on('rejoin', function (nodeId) {
  console.log('I have a new node id:', nodeId.toString('hex'))
})
 
// this is called whenever a search is made for peers
// peers will be the result of that search (and may be empty)
bb.on('peers', function (peers) {
  console.log('I found peers:', peers)
})
 
bb.on('error', function (err) {
  console.error(err)
})

DEBUG=bitbootnode index.js

  bitboot Joining network with id 9bfe8cd199e4d134ea5834c088d8b66056157a24 (distance to rally 2.341762075932748e+42) +8ms
I have a new node id: 9bfe8cd199e4d134ea5834c088d8b66056157a24
  bitboot Searching, and creating interval for future searches +3s
  bitboot Searching for nodes near rally point +1ms
/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:101
  var closestdist = KBucket.distance(closest[0].id, this.rallyId)
                                                ^

TypeError: Cannot read property 'id' of undefined
    at Bitboot._attemptCommunication (/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:101:49)
    at finished (/Users/parweb/Sites/atmosfear/node_modules/bitboot/index.js:93:15)
    at done (/Users/parweb/Sites/atmosfear/node_modules/k-rpc/index.js:240:5)
    at processTicksAndRejections (internal/process/task_queues.js:79:9)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.