mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-17 16:58:50 +00:00
relay.negentropy.enabled config option: set to false to prevent processing negentropy messages
This commit is contained in:
@ -52,6 +52,8 @@ void RelayServer::runIngester(ThreadPool<MsgIngester>::Thread &thr) {
|
|||||||
sendNoticeError(msg->connId, std::string("bad close: ") + e.what());
|
sendNoticeError(msg->connId, std::string("bad close: ") + e.what());
|
||||||
}
|
}
|
||||||
} else if (cmd.starts_with("NEG-")) {
|
} else if (cmd.starts_with("NEG-")) {
|
||||||
|
if (!cfg().relay__negentropy__enabled) throw herr("negentropy disabled");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ingesterProcessNegentropy(txn, decomp, msg->connId, arr);
|
ingesterProcessNegentropy(txn, decomp, msg->connId, arr);
|
||||||
} catch (std::exception &e) {
|
} catch (std::exception &e) {
|
||||||
|
@ -95,6 +95,9 @@ config:
|
|||||||
default: 2
|
default: 2
|
||||||
noReload: true
|
noReload: true
|
||||||
|
|
||||||
|
- name: relay__negentropy__enabled
|
||||||
|
desc: "Support negentropy protocol messages"
|
||||||
|
default: true
|
||||||
- name: relay__negentropy__maxSyncEvents
|
- name: relay__negentropy__maxSyncEvents
|
||||||
desc: "Maximum records that sync will process before returning an error"
|
desc: "Maximum records that sync will process before returning an error"
|
||||||
default: 1000000
|
default: 1000000
|
||||||
|
@ -129,6 +129,9 @@ relay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
negentropy {
|
negentropy {
|
||||||
|
# Support negentropy protocol messages
|
||||||
|
enabled = true
|
||||||
|
|
||||||
# Maximum records that sync will process before returning an error
|
# Maximum records that sync will process before returning an error
|
||||||
maxSyncEvents = 1000000
|
maxSyncEvents = 1000000
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user