On master (c8971547d9c9460fcbec6f54888df83f002c3dfd) the bitcoin-cli does not handle the "work queue depth exceeded" event properly.
Steps to reproduce:
# terminal 0
./src/bitcoind -debug=rpc -rpcthreads=1 -rpcworkqueue=1
# terminal 1
./src/bitcoin-cli gettxoutsetinfo
# terminal 2
./src/bitcoin-cli gettxoutsetinfo
# terminal 3
./src/bitcoin-cli gettxoutsetinfo
error: couldn't parse reply from server
Expected behavior
Get a message from a server that work queue depth exceeded.
Actual behavior
Got the misleading message "couldn't parse reply from server".
With this PR:
# terminal 0
./src/bitcoind -debug=rpc -rpcthreads=1 -rpcworkqueue=1
# terminal 1
./src/bitcoin-cli gettxoutsetinfo
# terminal 2
./src/bitcoin-cli gettxoutsetinfo
# terminal 3
./src/bitcoin-cli gettxoutsetinfo
error: Server response: Work queue depth exceeded
UPDATE: apparently, it is an alternative to #18335