fn seal_change_set(
        &self,
        first_version: Version,
        num_txns: Version,
        mut cs: ChangeSet,
    ) -> Result<(SealedChangeSet, Option<LedgerCounters>)> {
        // Avoid reading base counter values when not necessary.
        let counters = if num_txns > 0 {
            Some(self.system_store.bump_ledger_counters(
                first_version,
                first_version + num_txns - 1,
                cs.counter_bumps,
                &mut cs.batch,
            )?)
        } else {
            None
        };

        Ok((SealedChangeSet { batch: cs.batch }, counters))
    }
// ================================== Private APIs ==================================
/// Convert a `ChangeSet` to `SealedChangeSet`.
///
/// Specifically, counter increases are added to current counter values and converted to DB
/// alternations.


Specifically, counter increases are added to current counter values and converted to DB
alternations.
Specifically counter increases are added to current counter values and converted to DB alternations .
fn seal_change_set(
        &self,
        first_version: Version,
        num_txns: Version,
        mut cs: ChangeSet,
    ) -> Result<(SealedChangeSet, Option<LedgerCounters>)> {
        // Avoid reading base counter values when not necessary.
        let counters = if num_txns > 0 {
            Some(self.system_store.bump_ledger_counters(
                first_version,
                first_version + num_txns - 1,
                cs.counter_bumps,
                &mut cs.batch,
            )?)
        } else {
            None
        };
        Ok((SealedChangeSet { batch: cs.batch }, counters))
    }
fn seal_change_set ( & self , first_version : Version , num_txns : Version , mut cs : ChangeSet , ) -> Result < ( SealedChangeSet , Option < LedgerCounters > ) > { // Avoid reading base counter values when not necessary. let counters = if num_txns > 0 { Some ( self . system_store . bump_ledger_counters ( first_version , first_version + num_txns - 1 , cs . counter_bumps , & mut cs . batch , ) ? ) } else { None } ; Ok ( ( SealedChangeSet { batch : cs . batch } , counters ) ) }
Private APIs
Convert a `ChangeSet` to `SealedChangeSet`.
Private APIs Convert a ` ChangeSet ` to ` SealedChangeSet ` .
&self
first_version
Version
num_txns
Version
cs
ChangeSet
&self
first_version
Version
num_txns
Version
cs
ChangeSet