Compare commits

...

5 Commits

Author SHA1 Message Date
RichardAH
d8d3182aa3 Merge branch 'dev' into fix-vscode 2024-10-25 11:55:55 +10:00
Wietse Wind
08f13b7cfe Fix account_tx sluggishness as per https://github.com/XRPLF/rippled/commit/2e9261cb (#308) 2024-10-25 11:13:42 +10:00
tequ
766f5d7ee1 Update macro.h (#366) 2024-10-25 10:10:43 +10:00
Wietse Wind
287c01ad04 Improve Admin command RPC Post (#384)
* Improve ADMIN HTTP POST RPC notifications: no queue limit, shorter HTTP call TTL
2024-10-25 10:10:14 +10:00
Denis Angell
cf64e05b82 Update settings.json 2024-07-12 11:18:10 +02:00
5 changed files with 22 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
"C_Cpp.clang_format_path": ".clang-format", "C_Cpp.clang_format_path": ".clang-format",
"C_Cpp.clang_format_fallbackStyle": "{ ColumnLimit: 0 }", "C_Cpp.clang_format_fallbackStyle": "{ ColumnLimit: 0 }",
"[cpp]":{ "[cpp]":{
"editor.wordBasedSuggestions": false, "editor.wordBasedSuggestions": "off",
"editor.suggest.insertMode": "replace", "editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true, "editor.semanticHighlighting.enabled": true,
"editor.tabSize": 4, "editor.tabSize": 4,

View File

@@ -1,5 +1,5 @@
/** /**
* These are helper macros for writing hooks, all of them are optional as is including hookmacro.h at all * These are helper macros for writing hooks, all of them are optional as is including macro.h at all
*/ */
#include <stdint.h> #include <stdint.h>

View File

@@ -1132,7 +1132,7 @@ accountTxPage(
{ {
sql = boost::str( sql = boost::str(
boost::format( boost::format(
prefix + (R"(AccountTransactions.LedgerSeq BETWEEN '%u' AND '%u' prefix + (R"(AccountTransactions.LedgerSeq BETWEEN %u AND %u
ORDER BY AccountTransactions.LedgerSeq %s, ORDER BY AccountTransactions.LedgerSeq %s,
AccountTransactions.TxnSeq %s AccountTransactions.TxnSeq %s
LIMIT %u;)")) % LIMIT %u;)")) %
@@ -1155,12 +1155,14 @@ accountTxPage(
FROM AccountTransactions, Transactions WHERE FROM AccountTransactions, Transactions WHERE
(AccountTransactions.TransID = Transactions.TransID AND (AccountTransactions.TransID = Transactions.TransID AND
AccountTransactions.Account = '%s' AND AccountTransactions.Account = '%s' AND
AccountTransactions.LedgerSeq BETWEEN '%u' AND '%u') AccountTransactions.LedgerSeq BETWEEN %u AND %u)
OR UNION
SELECT AccountTransactions.LedgerSeq,AccountTransactions.TxnSeq,Status,RawTxn,TxnMeta
FROM AccountTransactions, Transactions WHERE
(AccountTransactions.TransID = Transactions.TransID AND (AccountTransactions.TransID = Transactions.TransID AND
AccountTransactions.Account = '%s' AND AccountTransactions.Account = '%s' AND
AccountTransactions.LedgerSeq = '%u' AND AccountTransactions.LedgerSeq = %u AND
AccountTransactions.TxnSeq %s '%u') AccountTransactions.TxnSeq %s %u)
ORDER BY AccountTransactions.LedgerSeq %s, ORDER BY AccountTransactions.LedgerSeq %s,
AccountTransactions.TxnSeq %s AccountTransactions.TxnSeq %s
LIMIT %u; LIMIT %u;

View File

@@ -1894,7 +1894,9 @@ fromNetwork(
constexpr auto RPC_REPLY_MAX_BYTES = megabytes(256); constexpr auto RPC_REPLY_MAX_BYTES = megabytes(256);
using namespace std::chrono_literals; using namespace std::chrono_literals;
auto constexpr RPC_NOTIFY = 10min; // auto constexpr RPC_NOTIFY = 10min; // Wietse: lolwut 10 minutes for one
// HTTP call?
auto constexpr RPC_NOTIFY = 30s;
HTTPClient::request( HTTPClient::request(
bSSL, bSSL,

View File

@@ -78,12 +78,14 @@ public:
{ {
std::lock_guard sl(mLock); std::lock_guard sl(mLock);
if (mDeque.size() >= eventQueueMax) // Wietse: we're not going to limit this, this is admin-port only, scale
{ // accordingly Dropping events just like this results in inconsistent
// Drop the previous event. // data on the receiving end if (mDeque.size() >= eventQueueMax)
JLOG(j_.warn()) << "RPCCall::fromNetwork drop"; // {
mDeque.pop_back(); // // Drop the previous event.
} // JLOG(j_.warn()) << "RPCCall::fromNetwork drop";
// mDeque.pop_back();
// }
auto jm = broadcast ? j_.debug() : j_.info(); auto jm = broadcast ? j_.debug() : j_.info();
JLOG(jm) << "RPCCall::fromNetwork push: " << jvObj; JLOG(jm) << "RPCCall::fromNetwork push: " << jvObj;
@@ -182,7 +184,8 @@ private:
} }
private: private:
enum { eventQueueMax = 32 }; // Wietse: we're not going to limit this, this is admin-port only, scale
// accordingly enum { eventQueueMax = 32 };
boost::asio::io_service& m_io_service; boost::asio::io_service& m_io_service;
JobQueue& m_jobQueue; JobQueue& m_jobQueue;