mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Update the signature check flags if needed.
This commit is contained in:
@@ -160,7 +160,6 @@ TER Transactor::checkSeq()
|
|||||||
// check stuff before you bother to lock the ledger
|
// check stuff before you bother to lock the ledger
|
||||||
TER Transactor::preCheck()
|
TER Transactor::preCheck()
|
||||||
{
|
{
|
||||||
|
|
||||||
mTxnAccountID = mTxn.getSourceAccount().getAccountID();
|
mTxnAccountID = mTxn.getSourceAccount().getAccountID();
|
||||||
if (!mTxnAccountID)
|
if (!mTxnAccountID)
|
||||||
{
|
{
|
||||||
@@ -177,11 +176,15 @@ TER Transactor::preCheck()
|
|||||||
mSigningPubKey = RippleAddress::createAccountPublic(mTxn.getSigningPubKey());
|
mSigningPubKey = RippleAddress::createAccountPublic(mTxn.getSigningPubKey());
|
||||||
|
|
||||||
// Consistency: really signed.
|
// Consistency: really signed.
|
||||||
if ( !isSetBit(mParams, tapNO_CHECK_SIGN) && !mTxn.checkSign(mSigningPubKey))
|
if (!mTxn.isKnownGood())
|
||||||
{
|
{
|
||||||
cLog(lsWARNING) << "applyTransaction: Invalid transaction: bad signature";
|
if (mTxn.isKnownBad() || (!isSetBit(mParams, tapNO_CHECK_SIGN) && !mTxn.checkSign(mSigningPubKey)))
|
||||||
|
{
|
||||||
return temINVALID;
|
mTxn.setGood();
|
||||||
|
cLog(lsWARNING) << "applyTransaction: Invalid transaction: bad signature";
|
||||||
|
return temINVALID;
|
||||||
|
}
|
||||||
|
mTxn.isKnownGood();
|
||||||
}
|
}
|
||||||
|
|
||||||
return tesSUCCESS;
|
return tesSUCCESS;
|
||||||
|
|||||||
Reference in New Issue
Block a user