We have a hard-coded port number in this line.
This was noticed when running Trustchain on testnet4 and testnet3 on the same machine (I'm using port 3444 for testnet4).
There appear to be several other cases of this that should be fixed at the same time.