Skip to content

Commit 2ba1eb9

Browse files
committed
0.22.4-Leisure Upgrade
- Fix hang in clock timer comparison call for getorderlist
1 parent 9a2bb21 commit 2ba1eb9

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.69])
22
dnl Don't forget to push a corresponding tag when updating any of _CLIENT_VERSION_* numbers
33
define(_CLIENT_VERSION_MAJOR, 0)
44
define(_CLIENT_VERSION_MINOR, 22)
5-
define(_CLIENT_VERSION_BUILD, 3)
5+
define(_CLIENT_VERSION_BUILD, 4)
66
define(_CLIENT_VERSION_IS_RELEASE, true)
77
define(_COPYRIGHT_YEAR, 2024)
88
define(_COPYRIGHT_HOLDERS,[The %s developers])

src/rpc/blockchain.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3362,6 +3362,12 @@ UniValue exec(const JSONRPCRequest& request)
33623362
iRow++;
33633363
results.pushKV(DoubleToStringWithLeadingZeroes(iRow, 0, 3), sRow);
33643364
}
3365+
} else if (sItem == "hamans-hanging")
3366+
{
3367+
std::map<std::string, std::string> mapRequestHeaders;
3368+
mapRequestHeaders["Address"] = "";
3369+
std::string sResponse = AtomicCommunication("Test0", mapRequestHeaders);
3370+
results.pushKV("hang", sResponse);
33653371
}
33663372
else if (sItem == "getdogebalance")
33673373
{

src/rpcpog.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@ std::string Uplink(bool bPost, std::string sPayload, std::string sBaseURL, std::
924924

925925
// Variables used to read the response from the server
926926
int size;
927-
clock_t begin = clock();
927+
double nClockStart = GetAdjustedTime();
928+
928929
char buf[16384];
929930
memset(buf, 0, sizeof(buf));
930931

@@ -948,7 +949,8 @@ std::string Uplink(bool bPost, std::string sPayload, std::string sBaseURL, std::
948949
LogPrintf("\r\n BioReadFinished maxsize %f datasize %f ", dMaxSize, iRead);
949950

950951
clock_t end = clock();
951-
double elapsed_secs = double(end - begin) / (CLOCKS_PER_SEC + .01);
952+
double elapsed_secs = GetAdjustedTime() - nClockStart;
953+
952954
if (elapsed_secs > iTimeoutSecs) break;
953955
if (TermPeekFound(sData, iBOE)) break;
954956

@@ -997,7 +999,7 @@ std::string AtomicCommunication(std::string Action, std::map<std::string, std::s
997999
{
9981000
std::string sBaseDomain = "https://api.biblepay.org";
9991001
std::string sPage = "api/AtomicTrading/" + Action;
1000-
std::string sResponse = Uplink(true, "", sBaseDomain, sPage, SSL_PORT, 15, 1, mapRequestHeaders);
1002+
std::string sResponse = Uplink(true, "", sBaseDomain, sPage, SSL_PORT, 10, 1, mapRequestHeaders);
10011003
return sResponse;
10021004
}
10031005

src/rpcpog.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,17 @@ struct AtomicTrade
155155

156156
void PopulateBX()
157157
{
158-
if (Status == "canceled" && ReturnTXID != "") {
158+
if (Status == "canceled" && ReturnTXID != "")
159+
{
159160
if (Action == "buy") {
160161
BlockExplorerURL = "https://live.blockcypher.com/doge/tx/" + ReturnTXID + "/";
161162
} else if (Action == "sell") {
162163
BlockExplorerURL = "https://chainz.cryptoid.info/bbp/tx.dws?" + ReturnTXID + "/";
163164
}
164165
}
165166

166-
if (Status == "open" && ReturnTXID != "") {
167+
if (Status == "open" && CollateralTXID != "")
168+
{
167169
if (Action == "buy") {
168170
BlockExplorerURL = "https://live.blockcypher.com/doge/tx/" + CollateralTXID + "/";
169171
} else if (Action == "sell") {

0 commit comments

Comments
 (0)