mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Add OpenLedger:
The OpenLedger class encapsulates the functionality of maintaining the open ledger. It uses an OpenView with the last closed ledger as its base. Routines are provided to modify the open ledger to add new transactions, and to accept a new last closed ledger. Business logic for performing transaction retries is rewritten to fit this framework and used in the implementation of accept. When the RIPPLE_OPEN_LEDGER macro is set to 1 (BeastConfig.h), the global Application OpenLedger singleton maintains its open ledger in parallel by applying new transactions and accepting new last closed ledgers. In the current implementation this does not affect transaction processing but logs any differences in the results as compared to the original code. Logging shows an occasional mismatch in what the OpenLedger builds versus the original code, usually an OfferCreate which gets a terINSUF_RESERVE instead of tesSUCCESS.
This commit is contained in:
@@ -117,6 +117,9 @@ public:
|
||||
using mapped_type =
|
||||
std::shared_ptr<SLE const>;
|
||||
|
||||
BasicView (BasicView const&) = delete;
|
||||
BasicView& operator= (BasicView const&) = delete;
|
||||
|
||||
BasicView()
|
||||
: txs(*this)
|
||||
{
|
||||
@@ -643,6 +646,10 @@ operator&(ViewFlags const& lhs,
|
||||
class View : public BasicView
|
||||
{
|
||||
public:
|
||||
View() = default;
|
||||
View (View const&) = delete;
|
||||
View& operator= (View const&) = delete;
|
||||
|
||||
virtual ~View() = default;
|
||||
|
||||
/** Returns the contextual tx processing flags.
|
||||
|
||||
Reference in New Issue
Block a user