Skip to content

Commit 5efacc0

Browse files
author
neo hong
committed
remove vote instruction return value
1 parent 46e16fc commit 5efacc0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

libsolidity/analysis/GlobalContext.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,19 +510,17 @@ void GlobalContext::addValidateMultiSignMethod() {
510510
}
511511

512512
void GlobalContext::addVoteMethod() {
513-
// bool vote(address[] memory addresses, unit256[] tronpowerlist)
513+
// void vote(address[] memory addresses, unit256[] tronpowerlist)
514514
TypePointers parameterTypes;
515515

516516
parameterTypes.push_back(TypeProvider::array(DataLocation::Memory, TypeProvider::address()));
517517
parameterTypes.push_back(TypeProvider::array(DataLocation::Memory, TypeProvider::uint256()));
518518

519519
TypePointers returnParameterTypes;
520-
returnParameterTypes.push_back(TypeProvider::boolean());
521520
strings parameterNames;
522521
parameterNames.push_back("srList");
523522
parameterNames.push_back("tronpowerList");
524523
strings returnParameterNames;
525-
returnParameterNames.push_back("ok");
526524

527525
m_magicVariables.push_back(make_shared<MagicVariableDeclaration>(magicVariableToID("vote"), "vote", TypeProvider::function(
528526
parameterTypes,

libsolidity/codegen/ExpressionCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
14691469
m_context << Instruction::DUP1 << Instruction::MLOAD;
14701470
}
14711471
m_context << Instruction::NATIVEVOTE;
1472-
m_context << Instruction::DUP1 << Instruction::ISZERO;
1472+
m_context << Instruction::ISZERO;
14731473
m_context.appendConditionalRevert(true);
14741474
break;
14751475
}

0 commit comments

Comments
 (0)