Call functions only if public/external

This commit is contained in:
Bhargava Shastry 2020-04-16 01:44:35 +02:00
parent de6095098f
commit c4b0103dee

View File

@ -1182,7 +1182,7 @@ void SolContract::merge()
if (holds_alternative<shared_ptr<SolContractFunction>>(f))
{
auto function = get<shared_ptr<SolContractFunction>>(f);
if (function->implemented())
if (function->implemented() && (function->visibility() == SolFunctionVisibility::EXTERNAL || function->visibility() == SolFunctionVisibility::PUBLIC))
m_contractFunctionMap[name()].insert(pair(function->name(), function->returnValue()));
}
}
@ -1336,4 +1336,4 @@ pair<string, string> SolLibrary::pseudoRandomTest()
}
solAssert(m_publicFunctionMap.count(chosenFunction), "Sol proto adaptor: Invalid library function chosen");
return pair(chosenFunction, m_publicFunctionMap[chosenFunction]);
}
}