diff --git a/src/masternodes/rpc_poolpair.cpp b/src/masternodes/rpc_poolpair.cpp index c883d5c1d8..e32655dce0 100644 --- a/src/masternodes/rpc_poolpair.cpp +++ b/src/masternodes/rpc_poolpair.cpp @@ -1085,7 +1085,7 @@ UniValue testpoolswap(const JSONRPCRequest& request) { int targetHeight = ::ChainActive().Height() + 1; auto poolPair = mnview_dummy.GetPoolPair(poolSwapMsg.idTokenFrom, poolSwapMsg.idTokenTo); - if (poolPair && path == "auto") path = "direct"; + if (poolPair && poolPair->second.status && path == "auto") path = "direct"; // If no direct swap found search for composite swap if (path == "direct") {