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:
parent
470a2424a7
commit
9c371f2fec
src/public
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user