MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / _processCDCSnapshotMessage

Function _processCDCSnapshotMessage

cpp/cdc/CDC.cpp:745–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743 }
744
745 void _processCDCSnapshotMessage(CDCReqMsg& msg, const UDPMessage& udpMsg) {
746 auto err = _shared.sharedDb.snapshot(_basePath +"/snapshot-" + std::to_string(msg.body.getCdcSnapshot().snapshotId));
747 CDCRespMsg respMsg;
748 respMsg.id = msg.id;
749 if (err == TernError::NO_ERROR) {
750 respMsg.body.setCdcSnapshot();
751 } else {
752 respMsg.body.setError() = err;
753 }
754 _packCDCResponse(udpMsg.socketIx, udpMsg.clientAddr, CDCMessageKind::CDC_SNAPSHOT, respMsg);
755 }
756
757 #ifdef __clang__
758 __attribute__((no_sanitize("integer"))) // might wrap around (it's initialized randomly)

Callers 1

_processCDCMessagesFunction · 0.85

Calls 3

to_stringFunction · 0.85
_packCDCResponseFunction · 0.85
snapshotMethod · 0.45

Tested by

no test coverage detected