4
1
mirror of https://github.com/QuasarApp/Heart.git synced 2025-05-10 16:39:41 +00:00

some fixes of the api parsers

This commit is contained in:
Andrei Yankovich 2023-02-23 14:18:06 +01:00
parent 470a2424a7
commit 9c371f2fec
2 changed files with 5 additions and 2 deletions

@ -199,7 +199,7 @@ int AbstractNodeInfo::trust() const {
void AbstractNodeInfo::setTrust(int trust) {
_trust = trust;
if (isBanned()) {
if (isBanned() && _sct) {
QuasarAppUtils::Params::log(QString("The node %0 is banned!").
arg(_sct->peerAddress().toString()));

@ -193,7 +193,10 @@ QSharedPointer<iParser> APIVersionParser::selectParser(unsigned short cmd,
}
QSharedPointer<iParser> APIVersionParser::selectParser(const QString &parserKey,
AbstractNodeInfo *sender) const{
AbstractNodeInfo *sender) const {
if (!sender)
return nullptr;
auto parser = sender->getParser(parserKey);
if (!parser) {
parser = selectParserImpl(parserKey, sender);