mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Refactor treatment of Ledger:
All handling of Ledger in shared_ptr is modified to use a const managed object when the context requires immutable semantics.
This commit is contained in:
@@ -94,7 +94,6 @@ OpenView::OpenView (open_ledger_t,
|
||||
, base_ (base)
|
||||
, hold_ (std::move(hold))
|
||||
{
|
||||
info_.open = true;
|
||||
info_.validated = false;
|
||||
info_.accepted = false;
|
||||
info_.seq = base_->info().seq + 1;
|
||||
@@ -108,6 +107,7 @@ OpenView::OpenView (ReadView const* base,
|
||||
, info_ (base->info())
|
||||
, base_ (base)
|
||||
, hold_ (std::move(hold))
|
||||
, open_ (base->open())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -192,18 +192,16 @@ auto
|
||||
OpenView::txsBegin() const ->
|
||||
std::unique_ptr<txs_type::iter_base>
|
||||
{
|
||||
return std::make_unique<
|
||||
txs_iter_impl>(
|
||||
closed(), txs_.cbegin());
|
||||
return std::make_unique<txs_iter_impl>(
|
||||
!open(), txs_.cbegin());
|
||||
}
|
||||
|
||||
auto
|
||||
OpenView::txsEnd() const ->
|
||||
std::unique_ptr<txs_type::iter_base>
|
||||
{
|
||||
return std::make_unique<
|
||||
txs_iter_impl>(
|
||||
closed(), txs_.cend());
|
||||
return std::make_unique<txs_iter_impl>(
|
||||
!open(), txs_.cend());
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user