Skip to content

Commit 4de0441

Browse files
committed
build fix
1 parent b7bd07d commit 4de0441

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

node/node.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6076,7 +6076,8 @@ void Node::Validator::OnContractVarChange(const Blob& key, const Blob& val, bool
60766076
else
60776077
ZeroObject(vd);
60786078

6079-
auto* pV = m_ValidatorSet.Find(vk.m_KeyInContract.m_Address);
6079+
const auto& addr = Cast::Up<Block::Pbft::Address>(vk.m_KeyInContract.m_Address);
6080+
auto* pV = m_ValidatorSet.Find(addr);
60806081

60816082
if (!vd.m_Weight)
60826083
{
@@ -6094,7 +6095,7 @@ void Node::Validator::OnContractVarChange(const Blob& key, const Blob& val, bool
60946095
// I'm a validator, and the block isn't finalized yet.
60956096
// check if my assessment is consistent with this action
60966097
auto& msg = m_pMe->m_Assessment.m_Last;
6097-
auto it = msg.m_Reputation.find(vk.m_KeyInContract.m_Address);
6098+
auto it = msg.m_Reputation.find(addr);
60986099
if (msg.m_Reputation.end() != it)
60996100
{
61006101
auto fMy = it->second;
@@ -6105,8 +6106,8 @@ void Node::Validator::OnContractVarChange(const Blob& key, const Blob& val, bool
61056106

61066107
if (!pV)
61076108
{
6108-
pV = m_ValidatorSet.m_mapValidators.Create(vk.m_KeyInContract.m_Address);
6109-
pV->m_Whitelisted = Rules::get().m_Pbft.m_Whitelist.IsWhite(vk.m_KeyInContract.m_Address);
6109+
pV = m_ValidatorSet.m_mapValidators.Create(addr);
6110+
pV->m_Whitelisted = Rules::get().m_Pbft.m_Whitelist.IsWhite(addr);
61106111
pV->m_Weight = 0;
61116112
}
61126113

0 commit comments

Comments
 (0)