mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 09:16:47 +00:00
fix test error
This commit is contained in:
@@ -110,7 +110,7 @@ public:
|
||||
getMentionedAccounts() const;
|
||||
|
||||
static Blob
|
||||
getSigningData(STTx const& that);
|
||||
getSigningData(STObject const& that);
|
||||
|
||||
static Blob
|
||||
getSponsorSigningData(STTx const& that);
|
||||
|
||||
@@ -186,7 +186,7 @@ STTx::getMentionedAccounts() const
|
||||
}
|
||||
|
||||
Blob
|
||||
STTx::getSigningData(STTx const& that)
|
||||
STTx::getSigningData(STObject const& that)
|
||||
{
|
||||
Serializer s;
|
||||
s.add32(HashPrefix::txSign);
|
||||
@@ -507,7 +507,7 @@ multiSignHelper(
|
||||
// Make sure the MultiSigners are present. Otherwise they are not
|
||||
// attempting multi-signing and we just have a bad Signers.
|
||||
if (!signerObj.isFieldPresent(sfSigners))
|
||||
return Unexpected("Empty Signers.");
|
||||
return Unexpected("Empty SigningPubKey.");
|
||||
|
||||
// We don't allow both an sfSigners and an sfTxnSignature. Both fields
|
||||
// being present would indicate that the transaction is signed both ways.
|
||||
|
||||
@@ -2313,6 +2313,15 @@ class MPToken_test : public beast::unit_test::suite
|
||||
reward = STAmount{sfSignatureReward, USD(10)};
|
||||
minAmount = STAmount{sfMinAccountCreateAmount, mpt};
|
||||
}
|
||||
// SponsorshipSet
|
||||
{
|
||||
Json::Value jv;
|
||||
jv[jss::TransactionType] = jss::SponsorshipSet;
|
||||
jv[jss::Account] = alice.human();
|
||||
jv[sfSponsee.fieldName] = carol.human();
|
||||
jv[sfFeeAmount.fieldName] = mpt.getJson(JsonOptions::none);
|
||||
test(jv, sfFeeAmount.fieldName.c_str());
|
||||
}
|
||||
}
|
||||
BEAST_EXPECT(txWithAmounts.empty());
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ void
|
||||
sign(Json::Value& jv, Account const& account)
|
||||
{
|
||||
jv[jss::SigningPubKey] = strHex(account.pk().slice());
|
||||
auto const blob = STTx::getSigningData(STTx{parse(jv)});
|
||||
auto const blob = STTx::getSigningData(parse(jv));
|
||||
auto const sig = ripple::sign(account.pk(), account.sk(), makeSlice(blob));
|
||||
jv[jss::TxnSignature] = strHex(Slice{sig.data(), sig.size()});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user