Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The constructor can take the following attributes:
- `user`: JSON-RPC username (**required**)
- `pass`: JSON-RPC password (**required**)
- `peer`: P2P settings
- `host`: Peer IP to connect to (**optional.** default: 127.0.0.1)
- `host`: Peer IP to connect to (**optional.** default: same as `rpc.host`)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the docs. You are a gentleman and a scholar.

- `chain`: Chain definition (optional. strongly recommended)
- `prune`: automatically prune the oldest `.tx` file inside the `chain` folder when the number of files exceeds `prune`.
- `path`: the path to store the chain files in
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Bitwork {

// PEER
let m = new Messages({ Block: bsv.Block, BlockHeader: bsv.BlockHeader, Transaction: bsv.Transaction, MerkleBlock: bsv.MerkleBlock })
let g = Object.assign({ host: "127.0.0.1", messages: m }, (gene && gene.peer ? gene.peer : {}))
let g = Object.assign({ host: rpcconfig.host, messages: m }, (gene && gene.peer ? gene.peer : {}))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit. ;-) Good to go.

this.peer = new Peer(g)
this.peer.on("disconnect", function() { console.log("disconnected") })
this.peer.on("error", function(e) { console.log("Err", e) })
Expand Down