Remove default ctors from SecretKey and PublicKey: (#4607)

* It is now an invariant that all constructed Public Keys are valid,
  non-empty and contain 33 bytes of data.
* Additionally, the memory footprint of the PublicKey class is reduced.
  The size_ data member is declared as static.
* Distinguish and identify the PublisherList retrieved from the local
  config file, versus the ones obtained from other validators.
* Fixes #2942
This commit is contained in:
Chenna Keshava B S
2024-03-05 09:02:53 -08:00
committed by GitHub
parent 97863e0b62
commit 62dae3c6c6
39 changed files with 545 additions and 349 deletions

View File

@@ -63,21 +63,21 @@ class LedgerLoad_test : public beast::unit_test::suite
retval.ledgerFile = td.file("ledgerdata.json");
Env env{*this};
Account prev;
std::optional<Account> prev;
for (auto i = 0; i < 20; ++i)
{
Account acct{"A" + std::to_string(i)};
env.fund(XRP(10000), acct);
env.close();
if (i > 0)
if (i > 0 && BEAST_EXPECT(prev))
{
env.trust(acct["USD"](1000), prev);
env(pay(acct, prev, acct["USD"](5)));
env.trust(acct["USD"](1000), *prev);
env(pay(acct, *prev, acct["USD"](5)));
}
env(offer(acct, XRP(100), acct["USD"](1)));
env.close();
prev = std::move(acct);
prev.emplace(std::move(acct));
}
retval.ledger = env.rpc("ledger", "current", "full")[jss::result];