diff --git a/src/LedgerFormats.cpp b/src/LedgerFormats.cpp index da46d732d2..8cc358b58c 100644 --- a/src/LedgerFormats.cpp +++ b/src/LedgerFormats.cpp @@ -18,6 +18,8 @@ LedgerEntryFormat LedgerFormats[]= { S_FIELD(MessageKey), STI_VL, SOE_IFFLAG, 8 }, { S_FIELD(TransferRate), STI_UINT32, SOE_IFFLAG, 16 }, { S_FIELD(Domain), STI_VL, SOE_IFFLAG, 32 }, + { S_FIELD(PublishHash), STI_HASH256, SOE_IFFLAG, 64 }, + { S_FIELD(PublishSize), STI_UINT32, SOE_IFFLAG, 128 }, { S_FIELD(Extensions), STI_TL, SOE_IFFLAG, 0x01000000 }, { sfInvalid, NULL, STI_DONE, SOE_NEVER, -1 } } }, diff --git a/src/RPCServer.cpp b/src/RPCServer.cpp index 43be2f8af0..0ac81e6b54 100644 --- a/src/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -414,6 +414,60 @@ Json::Value RPCServer::accountFromString(const uint256& uLedger, NewcoinAddress& return Json::Value(Json::objectValue); } +// account_domain_set [] +Json::Value RPCServer::doAccountDomainSet(const Json::Value ¶ms) +{ + NewcoinAddress naSrcAccountID; + NewcoinAddress naSeed; + uint256 uLedger = mNetOps->getCurrentLedger(); + + if (!naSeed.setSeedGeneric(params[0u].asString())) + { + return RPCError(rpcBAD_SEED); + } + else if (!naSrcAccountID.setAccountID(params[1u].asString())) + { + return RPCError(rpcSRC_ACT_MALFORMED); + } + + NewcoinAddress naVerifyGenerator; + NewcoinAddress naAccountPublic; + NewcoinAddress naAccountPrivate; + AccountState::pointer asSrc; + STAmount saSrcBalance; + Json::Value obj = authorize(uLedger, naSeed, naSrcAccountID, naAccountPublic, naAccountPrivate, + saSrcBalance, theConfig.FEE_DEFAULT, asSrc, naVerifyGenerator); + + if (!obj.empty()) + return obj; + + Transaction::pointer trans = Transaction::sharedAccountSet( + naAccountPublic, naAccountPrivate, + naSrcAccountID, + asSrc->getSeq(), + theConfig.FEE_DEFAULT, + 0, // YYY No source tag + false, + uint128(), + false, + 0, + NewcoinAddress(), + true, + strCopy(params[2u].asString()), + false, + 0, + false, + uint256(), + 0); + + trans = mNetOps->submitTransaction(trans); + + obj["transaction"] = trans->getSTransaction()->getJson(0); + obj["status"] = trans->getStatus(); + + return Json::Value(Json::objectValue); +} + // account_email_set [] Json::Value RPCServer::doAccountEmailSet(const Json::Value ¶ms) { @@ -450,6 +504,7 @@ Json::Value RPCServer::doAccountEmailSet(const Json::Value ¶ms) MD5(reinterpret_cast(strEmail.c_str()), strEmail.size(), &vucMD5.front()); uint128 uEmailHash(vucMD5); + std::vector vucDomain; Transaction::pointer trans = Transaction::sharedAccountSet( naAccountPublic, naAccountPrivate, @@ -457,11 +512,18 @@ Json::Value RPCServer::doAccountEmailSet(const Json::Value ¶ms) asSrc->getSeq(), theConfig.FEE_DEFAULT, 0, // YYY No source tag - strEmail.empty(), - uEmailHash, + true, + strEmail.empty() ? uint128() : uEmailHash, false, uint256(), - NewcoinAddress()); + NewcoinAddress(), + false, + vucDomain, + false, + 0, + false, + uint256(), + 0); trans = mNetOps->submitTransaction(trans); @@ -549,6 +611,62 @@ Json::Value RPCServer::doAccountMessageSet(const Json::Value& params) { return RPCError(rpcPUBLIC_MALFORMED); } + NewcoinAddress naVerifyGenerator; + NewcoinAddress naAccountPublic; + NewcoinAddress naAccountPrivate; + AccountState::pointer asSrc; + STAmount saSrcBalance; + Json::Value obj = authorize(uLedger, naSeed, naSrcAccountID, naAccountPublic, naAccountPrivate, + saSrcBalance, theConfig.FEE_DEFAULT, asSrc, naVerifyGenerator); + std::vector vucDomain; + + if (!obj.empty()) + return obj; + + Transaction::pointer trans = Transaction::sharedAccountSet( + naAccountPublic, naAccountPrivate, + naSrcAccountID, + asSrc->getSeq(), + theConfig.FEE_DEFAULT, + 0, // YYY No source tag + false, + uint128(), + false, + uint256(), + naMessagePubKey, + false, + vucDomain, + false, + 0, + false, + uint256(), + 0); + + trans = mNetOps->submitTransaction(trans); + + obj["transaction"] = trans->getSTransaction()->getJson(0); + obj["status"] = trans->getStatus(); + obj["MessageKey"] = naMessagePubKey.humanAccountPublic(); + + return obj; +} + +// account_publish_set +Json::Value RPCServer::doAccountPublishSet(const Json::Value ¶ms) +{ + NewcoinAddress naSrcAccountID; + NewcoinAddress naSeed; + uint256 uLedger = mNetOps->getCurrentLedger(); + + if (!naSeed.setSeedGeneric(params[0u].asString())) + { + return RPCError(rpcBAD_SEED); + } + else if (!naSrcAccountID.setAccountID(params[1u].asString())) + { + return RPCError(rpcSRC_ACT_MALFORMED); + } + NewcoinAddress naVerifyGenerator; NewcoinAddress naAccountPublic; NewcoinAddress naAccountPrivate; @@ -560,6 +678,10 @@ Json::Value RPCServer::doAccountMessageSet(const Json::Value& params) { if (!obj.empty()) return obj; + uint256 uPublishHash(params[2u].asString()); + uint32 uPublishSize = lexical_cast_s(params[3u].asString()); + std::vector vucDomain; + Transaction::pointer trans = Transaction::sharedAccountSet( naAccountPublic, naAccountPrivate, naSrcAccountID, @@ -569,16 +691,79 @@ Json::Value RPCServer::doAccountMessageSet(const Json::Value& params) { false, uint128(), false, - uint256(), - naMessagePubKey); + 0, + NewcoinAddress(), + false, + vucDomain, + false, + 0, + true, + uPublishHash, + uPublishSize); trans = mNetOps->submitTransaction(trans); obj["transaction"] = trans->getSTransaction()->getJson(0); obj["status"] = trans->getStatus(); - obj["MessageKey"] = naMessagePubKey.humanAccountPublic(); - return obj; + return Json::Value(Json::objectValue); +} + +// account_rate_set +Json::Value RPCServer::doAccountRateSet(const Json::Value ¶ms) +{ + NewcoinAddress naSrcAccountID; + NewcoinAddress naSeed; + uint256 uLedger = mNetOps->getCurrentLedger(); + + if (!naSeed.setSeedGeneric(params[0u].asString())) + { + return RPCError(rpcBAD_SEED); + } + else if (!naSrcAccountID.setAccountID(params[1u].asString())) + { + return RPCError(rpcSRC_ACT_MALFORMED); + } + + NewcoinAddress naVerifyGenerator; + NewcoinAddress naAccountPublic; + NewcoinAddress naAccountPrivate; + AccountState::pointer asSrc; + STAmount saSrcBalance; + Json::Value obj = authorize(uLedger, naSeed, naSrcAccountID, naAccountPublic, naAccountPrivate, + saSrcBalance, theConfig.FEE_DEFAULT, asSrc, naVerifyGenerator); + + if (!obj.empty()) + return obj; + + uint32 uRate = lexical_cast_s(params[2u].asString()); + std::vector vucDomain; + + Transaction::pointer trans = Transaction::sharedAccountSet( + naAccountPublic, naAccountPrivate, + naSrcAccountID, + asSrc->getSeq(), + theConfig.FEE_DEFAULT, + 0, // YYY No source tag + false, + uint128(), + false, + 0, + NewcoinAddress(), + false, + vucDomain, + true, + uRate, + false, + uint256(), + 0); + + trans = mNetOps->submitTransaction(trans); + + obj["transaction"] = trans->getSTransaction()->getJson(0); + obj["status"] = trans->getStatus(); + + return Json::Value(Json::objectValue); } // account_wallet_set [] @@ -596,21 +781,23 @@ Json::Value RPCServer::doAccountWalletSet(const Json::Value& params) { return RPCError(rpcSRC_ACT_MALFORMED); } - NewcoinAddress naMasterGenerator; - NewcoinAddress naAccountPublic; - NewcoinAddress naAccountPrivate; - AccountState::pointer asSrc; - STAmount saSrcBalance; - Json::Value obj = authorize(uLedger, naSeed, naSrcAccountID, naAccountPublic, naAccountPrivate, + NewcoinAddress naMasterGenerator; + NewcoinAddress naAccountPublic; + NewcoinAddress naAccountPrivate; + AccountState::pointer asSrc; + STAmount saSrcBalance; + Json::Value obj = authorize(uLedger, naSeed, naSrcAccountID, naAccountPublic, naAccountPrivate, saSrcBalance, theConfig.FEE_DEFAULT, asSrc, naMasterGenerator); + std::vector vucDomain; if (!obj.empty()) return obj; - std::string strWalletLocator = params.size() == 3 ? params[2u].asString() : ""; - uint256 uWalletLocator; + std::string strWalletLocator = params.size() == 3 ? params[2u].asString() : ""; + uint256 uWalletLocator; - uWalletLocator.SetHex(strWalletLocator); + if (!strWalletLocator.empty()) + uWalletLocator.SetHex(strWalletLocator); Transaction::pointer trans = Transaction::sharedAccountSet( naAccountPublic, naAccountPrivate, @@ -620,9 +807,16 @@ Json::Value RPCServer::doAccountWalletSet(const Json::Value& params) { 0, // YYY No source tag false, uint128(), - strWalletLocator.empty(), + true, uWalletLocator, - NewcoinAddress()); + NewcoinAddress(), + false, + vucDomain, + false, + 0, + false, + uint256(), + 0); trans = mNetOps->submitTransaction(trans); @@ -942,7 +1136,7 @@ Json::Value RPCServer::doOwnerInfo(const Json::Value& params) { std::string strIdent = params[0u].asString(); bool bIndex; - int iIndex = 2 == params.size()? lexical_cast_s(params[1u].asString()) : 0; + int iIndex = 2 == params.size() ? lexical_cast_s(params[1u].asString()) : 0; NewcoinAddress naAccount; Json::Value ret; @@ -2117,9 +2311,12 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params bool mAdminRequired; unsigned int iOptions; } commandsA[] = { + { "account_domain_set", &RPCServer::doAccountDomainSet, 2, 3, false, optCurrent }, { "account_email_set", &RPCServer::doAccountEmailSet, 2, 3, false, optCurrent }, { "account_info", &RPCServer::doAccountInfo, 1, 2, false, optCurrent }, { "account_message_set", &RPCServer::doAccountMessageSet, 3, 3, false, optCurrent }, + { "account_publish_set", &RPCServer::doAccountPublishSet, 4, 4, false, optCurrent }, + { "account_rate_set", &RPCServer::doAccountRateSet, 3, 3, false, optCurrent }, { "account_tx", &RPCServer::doAccountTransactions, 2, 3, false, optNetwork }, { "account_wallet_set", &RPCServer::doAccountWalletSet, 2, 3, false, optCurrent }, { "connect", &RPCServer::doConnect, 1, 2, true }, diff --git a/src/RPCServer.h b/src/RPCServer.h index 6f62b4e570..539dcf2e7d 100644 --- a/src/RPCServer.h +++ b/src/RPCServer.h @@ -125,9 +125,12 @@ private: Json::Value accountFromString(const uint256& uLedger, NewcoinAddress& naAccount, bool& bIndex, const std::string& strIdent, const int iIndex); + Json::Value doAccountDomainSet(const Json::Value ¶ms); Json::Value doAccountEmailSet(const Json::Value ¶ms); Json::Value doAccountInfo(const Json::Value& params); Json::Value doAccountMessageSet(const Json::Value ¶ms); + Json::Value doAccountPublishSet(const Json::Value ¶ms); + Json::Value doAccountRateSet(const Json::Value ¶ms); Json::Value doAccountTransactions(const Json::Value& params); Json::Value doAccountWalletSet(const Json::Value ¶ms); Json::Value doConnect(const Json::Value& params); diff --git a/src/SerializedObject.h b/src/SerializedObject.h index b7b98f1fc3..0480266bee 100644 --- a/src/SerializedObject.h +++ b/src/SerializedObject.h @@ -85,6 +85,8 @@ enum SOE_Field sfPaths, sfPaysIssuer, sfPubKey, + sfPublishHash, + sfPublishSize, sfQualityIn, sfQualityOut, sfSendMax, diff --git a/src/Transaction.cpp b/src/Transaction.cpp index abee0b2f97..d600bfefae 100644 --- a/src/Transaction.cpp +++ b/src/Transaction.cpp @@ -117,25 +117,41 @@ bool Transaction::sign(const NewcoinAddress& naAccountPrivate) Transaction::pointer Transaction::setAccountSet( const NewcoinAddress& naPrivateKey, - bool bUnsetEmailHash, + bool bEmailHash, const uint128& uEmailHash, - bool bUnsetWalletLocator, + bool bWalletLocator, const uint256& uWalletLocator, - const NewcoinAddress& naMessagePublic) + const NewcoinAddress& naMessagePublic, + bool bDomain, + const std::vector& vucDomain, + bool bTransferRate, + const uint32 uTransferRate, + bool bPublish, + const uint256& uPublishHash, + const uint32 uPublishSize + ) { - mTransaction->setITFieldU32(sfFlags, - (bUnsetEmailHash ? tfUnsetEmailHash : 0) - | (bUnsetWalletLocator ? tfUnsetWalletLocator : 0)); - - if (!bUnsetEmailHash && !!uEmailHash) + if (!bEmailHash) mTransaction->setITFieldH128(sfEmailHash, uEmailHash); - if (!bUnsetWalletLocator && !!uWalletLocator) + if (!bWalletLocator) mTransaction->setITFieldH256(sfWalletLocator, uWalletLocator); if (naMessagePublic.isValid()) mTransaction->setITFieldVL(sfMessageKey, naMessagePublic.getAccountPublic()); + if (bDomain) + mTransaction->setITFieldVL(sfDomain, vucDomain); + + if (bTransferRate) + mTransaction->setITFieldU32(sfTransferRate, uTransferRate); + + if (bPublish) + { + mTransaction->setITFieldH256(sfPublishHash, uPublishHash); + mTransaction->setITFieldU32(sfPublishSize, uPublishSize); + } + sign(naPrivateKey); return shared_from_this(); @@ -147,15 +163,24 @@ Transaction::pointer Transaction::sharedAccountSet( uint32 uSeq, const STAmount& saFee, uint32 uSourceTag, - bool bUnsetEmailHash, + bool bEmailHash, const uint128& uEmailHash, - bool bUnsetWalletLocator, + bool bWalletLocator, const uint256& uWalletLocator, - const NewcoinAddress& naMessagePublic) + const NewcoinAddress& naMessagePublic, + bool bDomain, + const std::vector& vucDomain, + bool bTransferRate, + const uint32 uTransferRate, + bool bPublish, + const uint256& uPublishHash, + const uint32 uPublishSize) { pointer tResult = boost::make_shared(ttACCOUNT_SET, naPublicKey, naSourceAccount, uSeq, saFee, uSourceTag); - return tResult->setAccountSet(naPrivateKey, bUnsetEmailHash, uEmailHash, bUnsetWalletLocator, uWalletLocator, naMessagePublic); + return tResult->setAccountSet(naPrivateKey, bEmailHash, uEmailHash, bWalletLocator, uWalletLocator, + naMessagePublic, + bDomain, vucDomain, bTransferRate, uTransferRate, bPublish, uPublishHash, uPublishSize); } // diff --git a/src/Transaction.h b/src/Transaction.h index dd88c1ae77..745dce6d93 100644 --- a/src/Transaction.h +++ b/src/Transaction.h @@ -48,11 +48,18 @@ private: Transaction::pointer setAccountSet( const NewcoinAddress& naPrivateKey, - bool bUnsetEmailHash, + bool bEmailHash, const uint128& uEmailHash, - bool bUnsetWalletLocator, + bool bWalletLocator, const uint256& uWalletLocator, - const NewcoinAddress& naMessagePublic); + const NewcoinAddress& naMessagePublic, + bool bDomain, + const std::vector& vucDomain, + bool bTransferRate, + const uint32 uTransferRate, + bool bPublish, + const uint256& uPublishHash, + const uint32 uPublishSize); Transaction::pointer setClaim( const NewcoinAddress& naPrivateKey, @@ -138,11 +145,18 @@ public: uint32 uSeq, const STAmount& saFee, uint32 uSourceTag, - bool bUnsetEmailHash, + bool bEmailHash, const uint128& uEmailHash, - bool bUnsetWalletLocator, + bool bWalletLocator, const uint256& uWalletLocator, - const NewcoinAddress& naMessagePublic); + const NewcoinAddress& naMessagePublic, + bool bDomain, + const std::vector& vucDomain, + bool bTransferRate, + const uint32 uTransferRate, + bool bPublish, + const uint256& uPublishHash, + const uint32 uPublishSize); // Claim a wallet. static Transaction::pointer sharedClaim( diff --git a/src/TransactionEngine.cpp b/src/TransactionEngine.cpp index 3fce70bdd7..a641962acc 100644 --- a/src/TransactionEngine.cpp +++ b/src/TransactionEngine.cpp @@ -36,6 +36,7 @@ bool transResultInfo(TransactionEngineResult terCode, std::string& strToken, std { tenBAD_ISSUER, "tenBAD_ISSUER", "Malformed." }, { tenBAD_OFFER, "tenBAD_OFFER", "Malformed." }, { tenBAD_PATH_COUNT, "tenBAD_PATH_COUNT", "Malformed: too many paths." }, + { tenBAD_PUBLISH, "tenBAD_PUBLISH", "Malformed: bad publish." }, { tenBAD_RIPPLE, "tenBAD_RIPPLE", "Ledger prevents ripple from succeeding." }, { tenBAD_SET_ID, "tenBAD_SET_ID", "Malformed." }, { tenCLAIMED, "tenCLAIMED", "Can not claim a previously claimed account." }, @@ -1203,42 +1204,50 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran TransactionEngineResult TransactionEngine::doAccountSet(const SerializedTransaction& txn) { - std::cerr << "doAccountSet>" << std::endl; - - uint32 txFlags = txn.getFlags(); + Log(lsINFO) << "doAccountSet>"; // // EmailHash // - if (txFlags & tfUnsetEmailHash) + if (txn.getITFieldPresent(sfEmailHash)) { - std::cerr << "doAccountSet: unset email hash" << std::endl; + uint128 uHash = txn.getITFieldH128(sfEmailHash); - mTxnAccount->makeIFieldAbsent(sfEmailHash); - } - else if (txn.getITFieldPresent(sfEmailHash)) - { - std::cerr << "doAccountSet: set email hash" << std::endl; + if (uHash.isZero()) + { + Log(lsINFO) << "doAccountSet: unset email hash"; - mTxnAccount->setIFieldH128(sfEmailHash, txn.getITFieldH128(sfEmailHash)); + mTxnAccount->makeIFieldAbsent(sfEmailHash); + } + else + { + Log(lsINFO) << "doAccountSet: set email hash"; + + mTxnAccount->setIFieldH128(sfEmailHash, uHash); + } } // // WalletLocator // - if (txFlags & tfUnsetWalletLocator) + if (txn.getITFieldPresent(sfWalletLocator)) { - std::cerr << "doAccountSet: unset wallet locator" << std::endl; + uint256 uHash = txn.getITFieldH256(sfWalletLocator); - mTxnAccount->makeIFieldAbsent(sfWalletLocator); - } - else if (txn.getITFieldPresent(sfWalletLocator)) - { - std::cerr << "doAccountSet: set wallet locator" << std::endl; + if (uHash.isZero()) + { + Log(lsINFO) << "doAccountSet: unset wallet locator"; - mTxnAccount->setIFieldH256(sfWalletLocator, txn.getITFieldH256(sfWalletLocator)); + mTxnAccount->makeIFieldAbsent(sfEmailHash); + } + else + { + Log(lsINFO) << "doAccountSet: set wallet locator"; + + mTxnAccount->setIFieldH256(sfWalletLocator, uHash); + } } // @@ -1248,33 +1257,110 @@ TransactionEngineResult TransactionEngine::doAccountSet(const SerializedTransact if (!txn.getITFieldPresent(sfMessageKey)) { nothing(); - } else if (mTxnAccount->getIFieldPresent(sfMessageKey)) { - std::cerr << "doAccountSet: can not change message key" << std::endl; + Log(lsINFO) << "doAccountSet: can not change message key"; return tenMSG_SET; } else { - std::cerr << "doAccountSet: set message key" << std::endl; + Log(lsINFO) << "doAccountSet: set message key"; mTxnAccount->setIFieldVL(sfMessageKey, txn.getITFieldVL(sfMessageKey)); } - std::cerr << "doAccountSet<" << std::endl; + // + // Domain + // + + if (txn.getITFieldPresent(sfDomain)) + { + std::vector vucDomain = txn.getITFieldVL(sfDomain); + + if (vucDomain.empty()) + { + Log(lsINFO) << "doAccountSet: unset domain"; + + mTxnAccount->makeIFieldAbsent(sfDomain); + } + else + { + Log(lsINFO) << "doAccountSet: set domain"; + + mTxnAccount->setIFieldVL(sfDomain, vucDomain); + } + } + + // + // TransferRate + // + + if (txn.getITFieldPresent(sfTransferRate)) + { + uint32 uRate = txn.getITFieldU32(sfTransferRate); + + if (!uRate) + { + Log(lsINFO) << "doAccountSet: unset transfer rate"; + + mTxnAccount->makeIFieldAbsent(sfTransferRate); + } + else + { + Log(lsINFO) << "doAccountSet: set transfer rate"; + + mTxnAccount->setIFieldU32(sfTransferRate, uRate); + } + } + + // + // PublishHash && PublishSize + // + + bool bPublishHash = txn.getITFieldPresent(sfPublishHash); + bool bPublishSize = txn.getITFieldPresent(sfPublishSize); + + if (bPublishHash ^ bPublishSize) + { + Log(lsINFO) << "doAccountSet: bad publish"; + + return tenBAD_PUBLISH; + } + else if (bPublishHash && bPublishSize) + { + uint256 uHash = txn.getITFieldH256(sfPublishHash); + uint32 uSize = txn.getITFieldU32(sfPublishSize); + + if (uHash.isZero()) + { + Log(lsINFO) << "doAccountSet: unset publish"; + + mTxnAccount->makeIFieldAbsent(sfPublishHash); + mTxnAccount->makeIFieldAbsent(sfPublishSize); + } + else + { + Log(lsINFO) << "doAccountSet: set publish"; + + mTxnAccount->setIFieldH256(sfPublishHash, uHash); + mTxnAccount->setIFieldU32(sfPublishSize, uSize); + } + } + + Log(lsINFO) << "doAccountSet<"; return terSUCCESS; } TransactionEngineResult TransactionEngine::doClaim(const SerializedTransaction& txn) { - std::cerr << "doClaim>" << std::endl; + Log(lsINFO) << "doClaim>"; TransactionEngineResult terResult = setAuthorized(txn, true); - std::cerr << "doClaim<" << std::endl; + Log(lsINFO) << "doClaim<"; return terResult; } diff --git a/src/TransactionEngine.h b/src/TransactionEngine.h index f06038f576..82a651181b 100644 --- a/src/TransactionEngine.h +++ b/src/TransactionEngine.h @@ -28,6 +28,7 @@ enum TransactionEngineResult tenBAD_ISSUER, tenBAD_OFFER, tenBAD_PATH_COUNT, + tenBAD_PUBLISH, tenBAD_SET_ID, tenCREATEXNS, tenDST_IS_SRC, diff --git a/src/TransactionFormats.cpp b/src/TransactionFormats.cpp index a1af4d189f..95a753d2dd 100644 --- a/src/TransactionFormats.cpp +++ b/src/TransactionFormats.cpp @@ -12,6 +12,9 @@ TransactionFormat InnerTxnFormats[]= { S_FIELD(WalletLocator), STI_HASH256, SOE_IFFLAG, 4 }, { S_FIELD(MessageKey), STI_VL, SOE_IFFLAG, 8 }, { S_FIELD(Domain), STI_VL, SOE_IFFLAG, 16 }, + { S_FIELD(TransferRate), STI_UINT32, SOE_IFFLAG, 32 }, + { S_FIELD(PublishHash), STI_HASH256, SOE_IFFLAG, 64 }, + { S_FIELD(PublishSize), STI_UINT32, SOE_IFFLAG, 128 }, { S_FIELD(Extensions), STI_TL, SOE_IFFLAG, 0x02000000 }, { sfInvalid, NULL, STI_DONE, SOE_NEVER, -1 } } }, diff --git a/src/TransactionFormats.h b/src/TransactionFormats.h index 1fd9d9e142..a49a1513e1 100644 --- a/src/TransactionFormats.h +++ b/src/TransactionFormats.h @@ -39,10 +39,6 @@ const int TransactionMaxLen = 1048576; // Transaction flags. // -// AccountSet flags: -const uint32 tfUnsetEmailHash = 0x00010000; -const uint32 tfUnsetWalletLocator = 0x00020000; - // OfferCreate flags: const uint32 tfPassive = 0x00010000; diff --git a/src/main.cpp b/src/main.cpp index 5fd9c2687b..49d23edf31 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,10 +38,13 @@ void printHelp(const po::options_description& desc) cout << desc << endl; cout << "Commands: " << endl; + cout << " account_domain_set []" << endl; cout << " account_email_set []" << endl; cout << " account_info |" << endl; cout << " account_info || []" << endl; cout << " account_message_set " << endl; + cout << " account_publish_set " << endl; + cout << " account_rate_set " << endl; cout << " account_wallet_set []" << endl; cout << " connect []" << endl; cout << " data_delete " << endl;