mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
This commit introduces the "SortedDirectories" amendment, which addresses two distinct issues: First, it corrects a technical flaw that could, in some edge cases, prevent an empty intermediate page from being deleted. Second, it sorts directory entries within a page (other than order book page entries, which remain strictly FIFO). This makes insert operations deterministic, instead of pseudo-random and reliant on temporal ordering. Lastly, it removes the ability to perform a "soft delete" where the page number of the item to delete need not be known if the item is in the first 20 pages, and enforces a maximum limit to the number of pages that a directory can span.
37 lines
1.7 KiB
C++
37 lines
1.7 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#include <BeastConfig.h>
|
|
|
|
#include <ripple/ledger/impl/ApplyStateTable.cpp>
|
|
#include <ripple/ledger/impl/ApplyView.cpp>
|
|
#include <ripple/ledger/impl/ApplyViewBase.cpp>
|
|
#include <ripple/ledger/impl/ApplyViewImpl.cpp>
|
|
#include <ripple/ledger/impl/BookDirs.cpp>
|
|
#include <ripple/ledger/impl/CachedSLEs.cpp>
|
|
#include <ripple/ledger/impl/CachedView.cpp>
|
|
#include <ripple/ledger/impl/CashDiff.cpp>
|
|
#include <ripple/ledger/impl/Directory.cpp>
|
|
#include <ripple/ledger/impl/OpenView.cpp>
|
|
#include <ripple/ledger/impl/PaymentSandbox.cpp>
|
|
#include <ripple/ledger/impl/RawStateTable.cpp>
|
|
#include <ripple/ledger/impl/ReadView.cpp>
|
|
#include <ripple/ledger/impl/TxMeta.cpp>
|
|
#include <ripple/ledger/impl/View.cpp>
|