diff --git a/src/net_processing.cpp b/src/net_processing.cpp index bebd7c475d..4dbe539e79 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1209,15 +1209,11 @@ void static ProcessAssetGetData(CNode* pfrom, const Consensus::Params& consensus } bool push = false; - if (passetsCache && passetsCache->Exists(inv.name)) { - auto data = passetsCache->Get(inv.name); - connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::ASSETDATA, SerializedAssetData(data))); - push = true; - } else if (passetsdb) { + if (passets) { CNewAsset asset; int height; uint256 hash; - if (passetsdb->ReadAssetData(inv.name, asset, height, hash)) { + if (passets->GetAssetMetaDataIfExists(inv.name, asset, height, hash)) { auto data = CDatabasedAssetData(asset, height, hash); passetsCache->Put(inv.name, data); connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::ASSETDATA, SerializedAssetData(data))); @@ -1688,7 +1684,6 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr } } - else if (strCommand == NetMsgType::GETDATA) { std::vector vInv; @@ -3116,7 +3111,6 @@ bool PeerLogicValidation::SendMessages(CNode* pto, std::atomic& interruptM // Message: getassetdata // if (pto->nVersion >= ASSETDATA_VERSION && pto->fGetAssetData) { - LogPrintf("Got to getassetdata net_processing\n"); LOCK(pto->cs_inventory); pto->fGetAssetData = false;