Changeset View
Changeset View
Standalone View
Standalone View
src/avalanche/processor.cpp
Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | public: | ||||
const uint256 hash = hasher.GetHash(); | const uint256 hash = hasher.GetHash(); | ||||
// Now let's sign! | // Now let's sign! | ||||
if (!key.SignSchnorr(hash, sig)) { | if (!key.SignSchnorr(hash, sig)) { | ||||
sig.fill(0); | sig.fill(0); | ||||
} | } | ||||
} | } | ||||
// serialization support | SERIALIZE_METHODS(TCPResponse, obj) { | ||||
ADD_SERIALIZE_METHODS; | READWRITE(obj.response, obj.sig); | ||||
template <typename Stream, typename Operation> | |||||
inline void SerializationOp(Stream &s, Operation ser_action) { | |||||
READWRITE(response); | |||||
READWRITE(sig); | |||||
} | } | ||||
}; | }; | ||||
} // namespace | } // namespace | ||||
void Processor::sendResponse(CNode *pfrom, Response response) const { | void Processor::sendResponse(CNode *pfrom, Response response) const { | ||||
connman->PushMessage( | connman->PushMessage( | ||||
pfrom, CNetMsgMaker(pfrom->GetCommonVersion()) | pfrom, CNetMsgMaker(pfrom->GetCommonVersion()) | ||||
.Make(NetMsgType::AVARESPONSE, | .Make(NetMsgType::AVARESPONSE, | ||||
▲ Show 20 Lines • Show All 315 Lines • Show Last 20 Lines |