Skip to content

Commit 7812903

Browse files
committed
Ledger: reorg imports
1 parent b945e07 commit 7812903

File tree

5 files changed

+24
-29
lines changed

5 files changed

+24
-29
lines changed

ledger/src/scan_state/transaction_logic/transaction_applied.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
use mina_core::constants::ConstraintConstants;
2-
use mina_curves::pasta::Fp;
3-
4-
use crate::{Account, AccountId};
5-
61
use super::{
72
signed_command, zkapp_command, Coinbase, FeeTransfer, Transaction, TransactionStatus,
83
UserCommand, WithStatus,
94
};
10-
use crate::scan_state::currency::{Amount, Magnitude, Signed};
5+
use crate::{
6+
scan_state::currency::{Amount, Magnitude, Signed},
7+
Account, AccountId,
8+
};
9+
use mina_core::constants::ConstraintConstants;
10+
use mina_curves::pasta::Fp;
1111

1212
pub mod signed_command_applied {
1313
use mina_signer::CompressedPubKey;

ledger/src/scan_state/transaction_logic/transaction_witness.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use mina_p2p_messages::v2::MinaStateProtocolStateBodyValueStableV2;
2-
3-
use crate::{scan_state::pending_coinbase::Stack, sparse_ledger::SparseLedger};
4-
51
use super::{Transaction, TransactionStatus};
6-
use crate::scan_state::currency::Slot;
2+
use crate::{
3+
scan_state::{currency::Slot, pending_coinbase::Stack},
4+
sparse_ledger::SparseLedger,
5+
};
6+
use mina_p2p_messages::v2::MinaStateProtocolStateBodyValueStableV2;
77

88
/// <https://github.com/MinaProtocol/mina/blob/436023ba41c43a50458a551b7ef7a9ae61670b25/src/lib/transaction_witness/transaction_witness.ml#L55>
99
#[derive(Debug)]

ledger/src/transaction_pool.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
use backtrace::Backtrace;
2-
use serde::{Deserialize, Serialize};
3-
use std::{
4-
borrow::{Borrow, Cow},
5-
collections::{hash_map::Entry, BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
6-
};
7-
8-
use itertools::Itertools;
9-
use mina_core::{bug_condition, consensus::ConsensusConstants};
10-
use mina_curves::pasta::Fp;
11-
use mina_p2p_messages::{bigint::BigInt, v2};
12-
131
use crate::{
142
scan_state::{
153
currency::{Amount, Balance, BlockTime, Fee, Magnitude, Nonce, Slot},
@@ -27,6 +15,16 @@ use crate::{
2715
verifier::{Verifier, VerifierError},
2816
Account, AccountId, BaseLedger, Mask, TokenId, VerificationKey, VerificationKeyWire,
2917
};
18+
use backtrace::Backtrace;
19+
use itertools::Itertools;
20+
use mina_core::{bug_condition, consensus::ConsensusConstants};
21+
use mina_curves::pasta::Fp;
22+
use mina_p2p_messages::{bigint::BigInt, v2};
23+
use serde::{Deserialize, Serialize};
24+
use std::{
25+
borrow::{Borrow, Cow},
26+
collections::{hash_map::Entry, BTreeMap, BTreeSet, HashMap, HashSet, VecDeque},
27+
};
3028

3129
#[derive(Debug, thiserror::Error)]
3230
pub enum TransactionPoolErrors {

ledger/src/tree.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
use std::{collections::BTreeMap, fmt::Debug, sync::Mutex};
2-
31
use crate::{
42
address::Address,
53
base::AccountIndex,
64
tree_version::{TreeVersion, V2},
75
};
86
use mina_curves::pasta::Fp;
97
use once_cell::sync::Lazy;
8+
use std::{collections::BTreeMap, fmt::Debug, sync::Mutex};
109

1110
#[derive(Clone, Debug)]
1211
struct Leaf<T: TreeVersion> {

ledger/src/tree_version.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
use std::{fmt::Debug, hash::Hash};
2-
1+
use crate::account::{get_legacy_hash_of, Account, AccountLegacy, TokenId, TokenIdLegacy};
32
use mina_curves::pasta::Fp;
43
use poseidon::hash::params::get_merkle_param_for_height;
5-
6-
use crate::account::{get_legacy_hash_of, Account, AccountLegacy, TokenId, TokenIdLegacy};
4+
use std::{fmt::Debug, hash::Hash};
75

86
pub trait TreeVersion {
97
type Account: Debug + Clone;

0 commit comments

Comments
 (0)