mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Get rid of unneeded signature parameter for NicknameSet.
This commit is contained in:
@@ -616,7 +616,10 @@ STAmount operator-(const STAmount& v1, const STAmount& v2)
|
||||
|
||||
v1.throwComparable(v2);
|
||||
if (v2.mIsNative)
|
||||
{
|
||||
// XXX This could be better, check for overflow and that maximum range is covered.
|
||||
return STAmount::createFromInt64(v1.getFName(), v1.getSNValue() - v2.getSNValue());
|
||||
}
|
||||
|
||||
int ov1 = v1.mOffset, ov2 = v2.mOffset;
|
||||
int64 vv1 = static_cast<int64>(v1.mValue), vv2 = static_cast<int64>(v2.mValue);
|
||||
|
||||
@@ -960,7 +960,6 @@ Json::Value RPCServer::doNicknameSet(const Json::Value& params)
|
||||
std::string strOfferCurrency;
|
||||
std::string strNickname = params[2u].asString();
|
||||
boost::trim(strNickname);
|
||||
std::vector<unsigned char> vucSignature;
|
||||
|
||||
if (strNickname.empty())
|
||||
{
|
||||
@@ -1012,8 +1011,7 @@ Json::Value RPCServer::doNicknameSet(const Json::Value& params)
|
||||
0, // YYY No source tag
|
||||
Ledger::getNicknameHash(strNickname),
|
||||
bSetOffer,
|
||||
saMinimumOffer,
|
||||
vucSignature);
|
||||
saMinimumOffer);
|
||||
|
||||
trans = mNetOps->submitTransaction(trans);
|
||||
|
||||
@@ -1783,14 +1781,14 @@ Json::Value RPCServer::doSend(const Json::Value& params)
|
||||
// bool ret_b;
|
||||
// ret_b = false;
|
||||
|
||||
if (!saSrcAmountMax.isNative() || !saDstAmount.isNative())
|
||||
if (!saSrcAmountMax.isNative() || !saDstAmount.isNative())
|
||||
{
|
||||
STAmount::currencyFromString(srcCurrencyID, sSrcCurrency);
|
||||
Pathfinder pf(naSrcAccountID, naDstAccountID, srcCurrencyID, saDstAmount);
|
||||
// ret_b = pf.findPaths(5, 1, spsPaths);
|
||||
pf.findPaths(5, 1, spsPaths);
|
||||
}
|
||||
|
||||
|
||||
trans = Transaction::sharedPayment(
|
||||
naAccountPublic, naAccountPrivate,
|
||||
naSrcAccountID,
|
||||
|
||||
@@ -298,8 +298,7 @@ Transaction::pointer Transaction::setNicknameSet(
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer,
|
||||
const std::vector<unsigned char>& vucSignature)
|
||||
const STAmount& saMinimumOffer)
|
||||
{
|
||||
mTransaction->setITFieldH256(sfNickname, uNickname);
|
||||
|
||||
@@ -307,9 +306,6 @@ Transaction::pointer Transaction::setNicknameSet(
|
||||
if (bSetOffer)
|
||||
mTransaction->setITFieldAmount(sfMinimumOffer, saMinimumOffer);
|
||||
|
||||
if (!vucSignature.empty())
|
||||
mTransaction->setITFieldVL(sfSignature, vucSignature);
|
||||
|
||||
sign(naPrivateKey);
|
||||
|
||||
return shared_from_this();
|
||||
@@ -325,12 +321,11 @@ Transaction::pointer Transaction::sharedNicknameSet(
|
||||
uint32 uSourceTag,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer,
|
||||
const std::vector<unsigned char>& vucSignature)
|
||||
const STAmount& saMinimumOffer)
|
||||
{
|
||||
pointer tResult = boost::make_shared<Transaction>(ttNICKNAME_SET, naPublicKey, naSourceAccount, uSeq, saFee, uSourceTag);
|
||||
|
||||
return tResult->setNicknameSet(naPrivateKey, uNickname, bSetOffer, saMinimumOffer, vucSignature);
|
||||
return tResult->setNicknameSet(naPrivateKey, uNickname, bSetOffer, saMinimumOffer);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -84,8 +84,7 @@ private:
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer,
|
||||
const std::vector<unsigned char>& vucSignature);
|
||||
const STAmount& saMinimumOffer);
|
||||
|
||||
Transaction::pointer setOfferCreate(
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
@@ -198,8 +197,7 @@ public:
|
||||
uint32 uSourceTag,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer,
|
||||
const std::vector<unsigned char>& vucSignature);
|
||||
const STAmount& saMinimumOffer);
|
||||
|
||||
// Pre-fund password change.
|
||||
static Transaction::pointer sharedPasswordFund(
|
||||
|
||||
Reference in New Issue
Block a user