mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refactor View classes:
The View hierarchy of classes is reorganized to include new classes with member functions moved and renamed, to solve defects in the original design: OpenView accumulates raw state and tx changes and can be applied to the base. ApplyView accumulates changes for a single transaction, including metadata, and can be applied to an OpenView. The Sandbox allows changes with the option to apply or throw them out. The PaymentSandbox provides a sandbox with account credit deferral. Call sites are changed to use the class appropriate for the task.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace ripple {
|
||||
|
||||
OfferStream::OfferStream (View& view, View& view_cancel,
|
||||
OfferStream::OfferStream (ApplyView& view, ApplyView& view_cancel,
|
||||
BookRef book, Clock::time_point when,
|
||||
Config const& config, beast::Journal journal)
|
||||
: j_ (journal)
|
||||
@@ -38,9 +38,9 @@ OfferStream::OfferStream (View& view, View& view_cancel,
|
||||
// Handle the case where a directory item with no corresponding ledger entry
|
||||
// is found. This shouldn't happen but if it does we clean it up.
|
||||
void
|
||||
OfferStream::erase (View& view)
|
||||
OfferStream::erase (ApplyView& view)
|
||||
{
|
||||
// NIKB NOTE This should be using View::dirDelete, which would
|
||||
// NIKB NOTE This should be using ApplyView::dirDelete, which would
|
||||
// correctly remove the directory if its the last entry.
|
||||
// Unfortunately this is a protocol breaking change.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user