From cc255f2b697b0998d621b2c3fd668040785835c5 Mon Sep 17 00:00:00 2001 From: neo hong Date: Sat, 24 Jul 2021 12:43:13 +0800 Subject: [PATCH] remove vote instruction return value --- libevmasm/Instruction.cpp | 2 +- libsolidity/codegen/ExpressionCompiler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libevmasm/Instruction.cpp b/libevmasm/Instruction.cpp index 2aa6d4b19e62..b24a7eff95cd 100644 --- a/libevmasm/Instruction.cpp +++ b/libevmasm/Instruction.cpp @@ -225,7 +225,7 @@ static std::map const c_instructionInfo = { Instruction::NATIVEFREEZE, { "NATIVEFREEZE", 0, 3, 1, true, Tier::Ext } }, { Instruction::NATIVEUNFREEZE, { "NATIVEUNFREEZE", 0, 2, 1, true, Tier::Ext } }, { Instruction::NATIVEFREEZEEXPIRETIME, { "NATIVEFREEZEEXPIRETIME", 0, 2, 1, true, Tier::Ext } }, - { Instruction::NATIVEVOTE, { "NATIVEVOTE", 0, 4, 0, true, Tier::Ext } }, + { Instruction::NATIVEVOTE, { "NATIVEVOTE", 0, 4, 1, true, Tier::Ext } }, { Instruction::NATIVEWITHDRAWREWARD, { "NATIVEWITHDRAWREWARD", 0, 0, 1, true, Tier::Ext } }, { Instruction::CALLER, { "CALLER", 0, 0, 1, false, Tier::Base } }, { Instruction::CALLVALUE, { "CALLVALUE", 0, 0, 1, false, Tier::Base } }, diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 451213a6c97b..a4a117e4e321 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1385,7 +1385,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; }