mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove PublishHash support and add WalletSize.
This commit is contained in:
@@ -186,40 +186,6 @@ TER TransactionEngine::doAccountSet(const SerializedTransaction& txn)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// PublishHash && PublishSize
|
||||
//
|
||||
|
||||
bool bPublishHash = txn.isFieldPresent(sfPublishHash);
|
||||
bool bPublishSize = txn.isFieldPresent(sfPublishSize);
|
||||
|
||||
if (bPublishHash ^ bPublishSize)
|
||||
{
|
||||
Log(lsINFO) << "doAccountSet: bad publish";
|
||||
|
||||
return temBAD_PUBLISH;
|
||||
}
|
||||
else if (bPublishHash && bPublishSize)
|
||||
{
|
||||
uint256 uHash = txn.getFieldH256(sfPublishHash);
|
||||
uint32 uSize = txn.getFieldU32(sfPublishSize);
|
||||
|
||||
if (!uHash)
|
||||
{
|
||||
Log(lsINFO) << "doAccountSet: unset publish";
|
||||
|
||||
mTxnAccount->makeFieldAbsent(sfPublishHash);
|
||||
mTxnAccount->makeFieldAbsent(sfPublishSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log(lsINFO) << "doAccountSet: set publish";
|
||||
|
||||
mTxnAccount->setFieldH256(sfPublishHash, uHash);
|
||||
mTxnAccount->setFieldU32(sfPublishSize, uSize);
|
||||
}
|
||||
}
|
||||
|
||||
Log(lsINFO) << "doAccountSet<";
|
||||
|
||||
return tesSUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user