Combine STTx::checkSign overloads:

Callers don't need to specify the signing key -- they're just retrieving
the key from the SerializedTransaction and then passing it back.

This simplifies Ed25519 implementation.
This commit is contained in:
Josh Juran
2014-12-03 12:50:35 -05:00
committed by Nik Bougalis
parent eeea2b1ff8
commit fbf5785e35
4 changed files with 8 additions and 21 deletions

View File

@@ -251,7 +251,7 @@ TER Transactor::preCheck ()
if (!mTxn.isKnownGood ())
{
if (mTxn.isKnownBad () ||
(!(mParams & tapNO_CHECK_SIGN) && !mTxn.checkSign (mSigningPubKey)))
(!(mParams & tapNO_CHECK_SIGN) && !mTxn.checkSign()))
{
mTxn.setBad ();
m_journal.warning << "apply: Invalid transaction (bad signature)";

View File

@@ -69,7 +69,7 @@ Transaction::pointer Transaction::sharedTransaction (
bool Transaction::checkSign () const
{
if (mFromPubKey.isValid ())
return mTransaction->checkSign (mFromPubKey);
return mTransaction->checkSign();
WriteLog (lsWARNING, Ledger) << "Transaction has bad source public key";
return false;