Skip to content

Commit

Permalink
only clear when verify sig
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 committed Sep 11, 2023
1 parent 98b519e commit 3431682
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ class TransactionFactoryImpl : public bcos::protocol::TransactionFactory
BOOST_THROW_EXCEPTION(std::invalid_argument("transaction hash mismatching"));
}

transaction->mutableInner().sender.clear(); // Bugfix: User will fake a illegal sender,
// must clear sender given by rpc

if (checkSig)
{
transaction->mutableInner().sender.clear(); // Bugfix: User will fake a illegal sender,
// must clear sender given by rpc

transaction->verify(*m_cryptoSuite->hashImpl(), *m_cryptoSuite->signatureImpl());
}
return transaction;
Expand Down

0 comments on commit 3431682

Please sign in to comment.