mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Change ConfidentialSend preflight error code (#5994)
This commit is contained in:
@@ -910,7 +910,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
|
||||
Buffer(ripple::ecGamalEncryptedTotalLength),
|
||||
.issuerEncryptedAmt =
|
||||
Buffer(ripple::ecGamalEncryptedTotalLength),
|
||||
.err = temMALFORMED});
|
||||
.err = temBAD_CIPHERTEXT});
|
||||
// dest encrypted amount wrong length
|
||||
mptAlice.send(
|
||||
{.account = bob,
|
||||
@@ -922,7 +922,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
|
||||
.destEncryptedAmt = Buffer(10), // Incorrect length
|
||||
.issuerEncryptedAmt =
|
||||
Buffer(ripple::ecGamalEncryptedTotalLength),
|
||||
.err = temMALFORMED});
|
||||
.err = temBAD_CIPHERTEXT});
|
||||
// issuer encrypted amount wrong length
|
||||
mptAlice.send(
|
||||
{.account = bob,
|
||||
@@ -934,7 +934,7 @@ class ConfidentialTransfer_test : public beast::unit_test::suite
|
||||
.destEncryptedAmt =
|
||||
Buffer(ripple::ecGamalEncryptedTotalLength),
|
||||
.issuerEncryptedAmt = Buffer(10),
|
||||
.err = temMALFORMED});
|
||||
.err = temBAD_CIPHERTEXT});
|
||||
|
||||
auto const ciphertextHex = generatePlaceholderCiphertext();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ ConfidentialSend::preflight(PreflightContext const& ctx)
|
||||
ctx.tx[sfDestinationEncryptedAmount].length() !=
|
||||
ecGamalEncryptedTotalLength ||
|
||||
ctx.tx[sfIssuerEncryptedAmount].length() != ecGamalEncryptedTotalLength)
|
||||
return temMALFORMED;
|
||||
return temBAD_CIPHERTEXT;
|
||||
|
||||
if (!isValidCiphertext(ctx.tx[sfSenderEncryptedAmount]) ||
|
||||
!isValidCiphertext(ctx.tx[sfDestinationEncryptedAmount]) ||
|
||||
|
||||
Reference in New Issue
Block a user