Skip to content

Commit

Permalink
remove vote instruction return value
Browse files Browse the repository at this point in the history
  • Loading branch information
neo hong committed Jul 24, 2021
1 parent bfbcd7f commit 6124c56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions libsolidity/analysis/GlobalContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,10 @@ namespace dev
parameterTypes.push_back(TypeProvider::array(DataLocation::Memory, TypeProvider::uint256()));

TypePointers returnParameterTypes;
returnParameterTypes.push_back(TypeProvider::boolean());
strings parameterNames;
parameterNames.push_back("srList");
parameterNames.push_back("tronpowerList");
strings returnParameterNames;
returnParameterNames.push_back("ok");

m_magicVariables.push_back(make_shared<MagicVariableDeclaration>("vote", TypeProvider::function(
parameterTypes,
Expand Down
2 changes: 1 addition & 1 deletion libsolidity/codegen/ExpressionCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
m_context << Instruction::DUP1 << Instruction::MLOAD;
}
m_context << Instruction::NATIVEVOTE;
m_context << Instruction::DUP1 << Instruction::ISZERO;
m_context << Instruction::ISZERO;
m_context.appendConditionalRevert(true);
break;
}
Expand Down

0 comments on commit 6124c56

Please sign in to comment.