Author Topic: BitShares RPC slow while syncing?  (Read 1199 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I have seen the same phenomenon. Only during syncing ...

Offline JA

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Hey im currently trying to get some info from a local wallet via curl in php.
Which works.
But the response form the client takes often longer than a minute.
Am i doing something wrong or does the wallet always take so long to answer while syncing?


here the php code
Code: [Select]
$data_string = '{"method": "get_info", "params": [], "id": "0"}';
$username = 'test';
$password = 'test';                                                                 
$ch = curl_init('http://127.0.0.1:19988/rpc');

curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");                                                               
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);                                                                 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                     
curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                         
    'Content-Type: application/json',                                                                               
    'Content-Length: ' . strlen($data_string))                                                                       
);                                                                                                                   
                                                                                                                     
$result = curl_exec($ch);
print_r ($result);