Skip to content

Commit b945e07

Browse files
committed
Ledger: remove documented code
1 parent fc58bc1 commit b945e07

File tree

3 files changed

+0
-42
lines changed

3 files changed

+0
-42
lines changed

ledger/src/scan_state/transaction_logic/transaction_partially_applied.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -678,33 +678,6 @@ fn update_timing_when_no_deduction(
678678
validate_timing(account, Amount::zero(), txn_global_slot)
679679
}
680680

681-
// /// TODO: Move this to the ledger
682-
// /// <https://github.com/MinaProtocol/mina/blob/2ee6e004ba8c6a0541056076aab22ea162f7eb3a/src/lib/mina_ledger/ledger.ml#L311>
683-
// fn get_or_create<L>(
684-
// ledger: &mut L,
685-
// account_id: &AccountId,
686-
// ) -> Result<(AccountState, Account, Address), String>
687-
// where
688-
// L: LedgerIntf,
689-
// {
690-
// let location = ledger
691-
// .get_or_create_account(account_id.clone(), Account::initialize(account_id))
692-
// .map_err(|e| format!("{:?}", e))?;
693-
694-
// let action = match location {
695-
// GetOrCreated::Added(_) => AccountState::Added,
696-
// GetOrCreated::Existed(_) => AccountState::Existed,
697-
// };
698-
699-
// let addr = location.addr();
700-
701-
// let account = ledger
702-
// .get(addr.clone())
703-
// .expect("get_or_create: Account was not found in the ledger after creation");
704-
705-
// Ok((action, account, addr))
706-
// }
707-
708681
fn get_new_accounts<T>(action: AccountState, data: T) -> Option<T> {
709682
match action {
710683
AccountState::Added => Some(data),

ledger/src/transaction_pool.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -589,16 +589,6 @@ pub struct IndexedPoolConfig {
589589
slot_tx_end: Option<Slot>,
590590
}
591591

592-
// module Config = struct
593-
// type t =
594-
// { constraint_constants : Genesis_constants.Constraint_constants.t
595-
// ; consensus_constants : Consensus.Constants.t
596-
// ; time_controller : Block_time.Controller.t
597-
// ; slot_tx_end : Mina_numbers.Global_slot_since_hard_fork.t option
598-
// }
599-
// [@@deriving sexp_of, equal, compare]
600-
// end
601-
602592
#[derive(Clone, Debug, Serialize, Deserialize)]
603593
pub struct IndexedPool {
604594
/// Transactions valid against the current ledger, indexed by fee per

ledger/src/tree_version.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,9 @@ impl TreeVersion for V2 {
3434
}
3535

3636
fn empty_hash_at_height(height: usize) -> Fp {
37-
// let now = redux::Instant::now();
38-
3937
(0..height).fold(Account::empty().hash(), |prev_hash, height| {
4038
Self::hash_node(height, prev_hash, prev_hash)
4139
})
42-
// elog!("empty_hash_at_height={:?} {:?}", height, now.elapsed());
43-
44-
// res
4540
}
4641
}
4742

0 commit comments

Comments
 (0)