RPC Ports

I know you can specify the ports…but what port does B&C naturally operate on?

Oh…and when you do specify a port - is that for BKS or BKC?

https://bitbucket.org/JordanLeePeershares/bcexchange/src/e472f471107c14fee592ae64eff843708f682ba0/src/protocol.h?at=master&fileviewer=file-view-default#protocol.h-20

// B&C Exchange protocol port. 2239 stands for BCEX on a telephone keypad
#define PROTOCOL_PORT     2239
// Base RPC port used by the BlockShare RPC server. BlockCredit RPC server listen ons RPC_PORT+1.
#define RPC_PORT          2240

// The same rules apply to testnet, but on different ports
#define TESTNET_PORT      12239
#define TESTNET_RPC_PORT  12240

#define PEERCOIN_RPC_PORT         9902
#define PEERCOIN_TESTNET_RPC_PORT 9904

I’m not sure if it works the same way when you specify it in the config. @sigmike or @erasmospunk would probably be able to clarify. But naturally the asset ports are incremented from the base shares port. So in this case BKC would be 2241. Does that mean if you set rpcport=10 in the config that BKC will be 11? I’m not sure, but it would be fairly easy to test. If I get some time i’ll try it out.

Sorry forgot that I should just see what is listening…
It looks like it is 2239 and 2240

1 Like

It works the same way. BKC RPC port is BKS RPC port + 1.

Unless you specify a port for a specific unit with -rpcportX where X is the unit. For example -rpcportC=6789.

Source