Browse Source

small changed based on comments

cl-refactor
yann300 10 years ago
parent
commit
7a557e42df
  1. 6
      libethereum/BlockChain.cpp
  2. 3
      mix/ClientModel.cpp
  3. 1
      mix/ClientModel.h
  4. 1
      mix/QFunctionDefinition.cpp
  5. 9
      mix/QVariableDeclaration.cpp

6
libethereum/BlockChain.cpp

@ -1068,11 +1068,11 @@ VerifiedBlockRef BlockChain::verifyBlock(bytes const& _block, function<void(Exce
VerifiedBlockRef res;
try
{
Strictness strictNess = Strictness::CheckEverything;
Strictness strictness = Strictness::CheckEverything;
if (_ir & ~ImportRequirements::ValidNonce)
strictNess = Strictness::IgnoreNonce;
strictness = Strictness::IgnoreNonce;
res.info.populate(_block, strictNess);
res.info.populate(_block, strictness);
res.info.verifyInternals(&_block);
}
catch (Exception& ex)

3
mix/ClientModel.cpp

@ -212,7 +212,6 @@ void ClientModel::setupScenario(QVariantMap _scenario)
WriteGuard(x_queueTransactions);
m_running = true;
m_currentScenario = _scenario;
QVariantList blocks = _scenario.value("blocks").toList();
QVariantList stateAccounts = _scenario.value("accounts").toList();
@ -244,7 +243,7 @@ void ClientModel::setupScenario(QVariantMap _scenario)
m_queueTransactions.push_back(transactions);
trToExecute = transactions.size() > 0;
}
m_client->resetState(m_accounts, Secret(m_currentScenario.value("miner").toMap().value("secret").toString().toStdString()));
m_client->resetState(m_accounts, Secret(_scenario.value("miner").toMap().value("secret").toString().toStdString()));
if (m_queueTransactions.count() > 0 && trToExecute)
{
setupExecutionChain();

1
mix/ClientModel.h

@ -273,7 +273,6 @@ private:
std::map<Address, QString> m_stdContractNames;
CodeModel* m_codeModel = nullptr;
QList<QVariantList> m_queueTransactions;
QVariantMap m_currentScenario;
mutable boost::shared_mutex x_queueTransactions;
};

1
mix/QFunctionDefinition.cpp

@ -37,7 +37,6 @@ QFunctionDefinition::QFunctionDefinition(QObject* _parent, dev::solidity::Functi
QFunctionDefinition::QFunctionDefinition(QObject* _parent, ASTPointer<FunctionDefinition> const& _f): QBasicNodeDefinition(_parent, _f.get()), m_hash(dev::sha3(_f->externalSignature())),
m_fullHash(dev::sha3(_f->externalSignature()))
{
for (unsigned i = 0; i < _f->getParameters().size(); ++i)
m_parameters.append(new QVariableDeclaration(parent(), _f->getParameters().at(i)));

9
mix/QVariableDeclaration.cpp

@ -33,23 +33,20 @@ namespace mix
QVariableDeclaration::QVariableDeclaration(QObject* _parent, ASTPointer<VariableDeclaration> const _v):
QBasicNodeDefinition(_parent, _v.get()),
m_type(new QSolidityType(this, CodeModel::nodeType(_v->getType().get())))
m_type(new QSolidityType(this, CodeModel::nodeType(_v->getType().get()))), m_isIndexed(_v->isIndexed())
{
m_isIndexed = _v->isIndexed();
}
QVariableDeclaration::QVariableDeclaration(QObject* _parent, std::string const& _name, SolidityType const& _type, bool _isIndexed):
QBasicNodeDefinition(_parent, _name),
m_type(new QSolidityType(_parent, _type))
m_type(new QSolidityType(_parent, _type)), m_isIndexed(_isIndexed)
{
m_isIndexed = _isIndexed;
}
QVariableDeclaration::QVariableDeclaration(QObject* _parent, std::string const& _name, solidity::Type const* _type, bool _isIndexed):
QBasicNodeDefinition(_parent, _name),
m_type(new QSolidityType(this, CodeModel::nodeType(_type)))
m_type(new QSolidityType(this, CodeModel::nodeType(_type))), m_isIndexed(_isIndexed)
{
m_isIndexed = _isIndexed;
}
QSolidityType::QSolidityType(QObject* _parent, SolidityType const& _type):

Loading…
Cancel
Save