@@ -2478,7 +2478,7 @@ TEST_CASE_VERSIONS("txenvelope", "[tx][envelope]")
24782478 }
24792479}
24802480
2481- TEST_CASE_VERSIONS (" overlay validation skips ed25519 signed payload signers" ,
2481+ TEST_CASE_VERSIONS (" overlay validation handles ed25519 signed payload signers" ,
24822482 " [tx][envelope][overlay]" )
24832483{
24842484 Config cfg = getTestConfig (0 , Config::TESTDB_IN_MEMORY );
@@ -2489,9 +2489,8 @@ TEST_CASE_VERSIONS("overlay validation skips ed25519 signed payload signers",
24892489
24902490 int64_t const paymentAmount = app->getLedgerManager ().getLastReserve () * 10 ;
24912491
2492- // This test validates that checkValidForOverlay skips
2493- // SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD verification, while checkValid
2494- // (used during txset validation and apply) does not.
2492+ // This test validates that checkValidForOverlay verifies
2493+ // SIGNER_KEY_TYPE_ED25519_SIGNED_PAYLOAD signers normally
24952494 for_versions_from (19 , *app, [&] {
24962495 auto a1 = root->create (" a1" , paymentAmount);
24972496
@@ -2537,18 +2536,14 @@ TEST_CASE_VERSIONS("overlay validation skips ed25519 signed payload signers",
25372536 REQUIRE (tx->getResultCode () == txSUCCESS);
25382537 }
25392538
2540- SECTION (" checkValidForOverlay rejects ed25519 signed payload signer" )
2539+ SECTION (" checkValidForOverlay accepts ed25519 signed payload signer" )
25412540 {
2542- // Overlay validation skips payload signer checking, so a tx
2543- // authorized only via payload signer should fail overlay
2544- // validation
25452541 LedgerTxn ltx (app->getLedgerTxnRoot ());
25462542 auto ls = LedgerSnapshot (ltx);
25472543 auto diagnostics = DiagnosticEventManager::createDisabled ();
25482544 auto result = tx->checkValidForOverlay (app->getAppConnector (), ls,
25492545 0 , 0 , 0 , diagnostics);
2550- REQUIRE (!result->isSuccess ());
2551- REQUIRE (result->getResultCode () == txBAD_AUTH);
2546+ REQUIRE (result->isSuccess ());
25522547 }
25532548
25542549 SECTION (" fee bump with ed25519 signed payload signer on inner tx" )
@@ -2567,16 +2562,14 @@ TEST_CASE_VERSIONS("overlay validation skips ed25519 signed payload signers",
25672562 REQUIRE (result->isSuccess ());
25682563 }
25692564
2570- SECTION (" checkValidForOverlay rejects fee bump" )
2565+ SECTION (" checkValidForOverlay accepts fee bump" )
25712566 {
25722567 LedgerTxn ltx (app->getLedgerTxnRoot ());
25732568 auto ls = LedgerSnapshot (ltx);
25742569 auto diagnostics = DiagnosticEventManager::createDisabled ();
25752570 auto result = feeBumpTx->checkValidForOverlay (
25762571 app->getAppConnector (), ls, 0 , 0 , 0 , diagnostics);
2577- REQUIRE (!result->isSuccess ());
2578- // Fee bump wraps the inner failure
2579- REQUIRE (result->getResultCode () == txFEE_BUMP_INNER_FAILED);
2572+ REQUIRE (result->isSuccess ());
25802573 }
25812574 }
25822575 });
0 commit comments