monero-ecosystem / monero-python

A comprehensive Python module for handling Monero cryptocurrency
BSD 3-Clause "New" or "Revised" License
247 stars 80 forks source link

connect to daemon that uses regtest flag #117

Closed euri10 closed 2 years ago

euri10 commented 2 years ago

I'm running a private testnet with some daemons and one in particular uses this command

monerod --stagenet --no-igd --hide-my-port --data-dir stagenet/node_01 --p2p-bind-ip 127.0.0.1 --log-level 1 --rpc-bind-ip 0.0.0.0 --add-exclusive-node 127.0.0.1:38080 --confirm-external-bind --detach --fixed-difficulty 1 --p2p-bind-port 28080 --rpc-bind-port 28081 --zmq-rpc-bind-port 28082

I can connect fine to it using the library, for instance with

daemon = JSONRPCDaemon(port=28081)
print(daemon.info())

But as soon as I use the --regtest flag in the above daemon command, I can't connect anymore and get this error, any idea as to why ?

    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
emesik commented 2 years ago

That flag enables some testing mode. The daemon just isn't accepting RPC connections. But I have no idea what is it for and what's the expected behavior.

euri10 commented 2 years ago

ok it seems, I dont know why, that --stagenet conflicts with --regtest, well when I remove it I can connect fine. sorry for the noise