| 629 | } |
| 630 | |
| 631 | bool AppInitServers(boost::thread_group& threadGroup) |
| 632 | { |
| 633 | RPCServer::OnStopped(&OnRPCStopped); |
| 634 | RPCServer::OnPreCommand(&OnRPCPreCommand); |
| 635 | if (!InitHTTPServer()) |
| 636 | return false; |
| 637 | if (!StartRPC()) |
| 638 | return false; |
| 639 | if (!StartHTTPRPC()) |
| 640 | return false; |
| 641 | if (GetBoolArg("-rest", false) && !StartREST()) |
| 642 | return false; |
| 643 | if (!StartHTTPServer(threadGroup)) |
| 644 | return false; |
| 645 | return true; |
| 646 | } |
| 647 | |
| 648 | /** Initialize bitcoin. |
| 649 | * @pre Parameters should be parsed and config file should be read. |
no test coverage detected