Closed ales-tsurko closed 6 years ago
Ok as far as specifying a port for the wallet, it's actually somewhat similar to the object path we had to cook up in https://github.com/bcoin-org/bcoin/issues/570 to get the wallet events:
Add this after the wallet plugin is added to the node:
node.plugins.walletdb.http.port = 40004;
Then:
const walletOptions = {
network: network.type,
port: 40004,
apiKey: 'api-key'
}
See also: https://github.com/bcoin-org/bcfg/pull/2
And also https://github.com/bcoin-org/bcoin/pull/562#issuecomment-417523199 I had a similar issue with configuring the wallet port.
Thanks a lot, guys!
Hi everyone, I'm wondering how to configure bcoin and bcash nodes to run them simultaneously in order to implement a multi-currency SPV wallet. I understand that I could achieve that by editing the
*.conf
files. But I need a way to do that in my code. I'm using aSPVNode
instance and aWalletClient
as described in this comment.For now it's intuitive for me to pass an option (
port
orhttpPort
) when I'm initializing a node. And looks like I'm fine with the node itself. But where I get stuck isWalletClient
configuration. Should I configure the wallet (server-side) somehow to change its port number? And how to do that in code then? My prototype looks like:Just can't find a point, where I can configure the wallet's port.
Additional question on running multiple nodes is: how can I differentiate the logs of the nodes in the console? Is it possible to add some prefix to the logger?