From 7a557e42df3afc8d6c9702753f4fe56eeb49031d Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 11 Jun 2015 15:46:29 +0200 Subject: [PATCH] small changed based on comments --- libethereum/BlockChain.cpp | 6 +++--- mix/ClientModel.cpp | 3 +-- mix/ClientModel.h | 1 - mix/QFunctionDefinition.cpp | 1 - mix/QVariableDeclaration.cpp | 9 +++------ 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp index 1d53e73f9..5a0b085a7 100644 --- a/libethereum/BlockChain.cpp +++ b/libethereum/BlockChain.cpp @@ -1068,11 +1068,11 @@ VerifiedBlockRef BlockChain::verifyBlock(bytes const& _block, function 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(); diff --git a/mix/ClientModel.h b/mix/ClientModel.h index 32348b603..b5b783b3d 100644 --- a/mix/ClientModel.h +++ b/mix/ClientModel.h @@ -273,7 +273,6 @@ private: std::map m_stdContractNames; CodeModel* m_codeModel = nullptr; QList m_queueTransactions; - QVariantMap m_currentScenario; mutable boost::shared_mutex x_queueTransactions; }; diff --git a/mix/QFunctionDefinition.cpp b/mix/QFunctionDefinition.cpp index 52d8ad30c..1a1dd8083 100644 --- a/mix/QFunctionDefinition.cpp +++ b/mix/QFunctionDefinition.cpp @@ -37,7 +37,6 @@ QFunctionDefinition::QFunctionDefinition(QObject* _parent, dev::solidity::Functi QFunctionDefinition::QFunctionDefinition(QObject* _parent, ASTPointer 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))); diff --git a/mix/QVariableDeclaration.cpp b/mix/QVariableDeclaration.cpp index 4299e34ee..a086585cd 100644 --- a/mix/QVariableDeclaration.cpp +++ b/mix/QVariableDeclaration.cpp @@ -33,23 +33,20 @@ namespace mix QVariableDeclaration::QVariableDeclaration(QObject* _parent, ASTPointer 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):