mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-08 08:13:08 +00:00
fix: fmt
This commit is contained in:
parent
cb22a95df2
commit
9bf0ec9de7
@ -97,7 +97,9 @@ impl NodeChainStore {
|
|||||||
);
|
);
|
||||||
|
|
||||||
for nullifier in tx.nullifier_created_hashes.iter() {
|
for nullifier in tx.nullifier_created_hashes.iter() {
|
||||||
self.nullifier_store.insert(UTXONullifier { utxo_hash: *nullifier });
|
self.nullifier_store.insert(UTXONullifier {
|
||||||
|
utxo_hash: *nullifier,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if !tx.encoded_data.is_empty() {
|
if !tx.encoded_data.is_empty() {
|
||||||
|
|||||||
@ -11,7 +11,9 @@ use chain_storage::NodeChainStore;
|
|||||||
use common::transaction::{Transaction, TransactionPayload, TxKind};
|
use common::transaction::{Transaction, TransactionPayload, TxKind};
|
||||||
use config::NodeConfig;
|
use config::NodeConfig;
|
||||||
use log::info;
|
use log::info;
|
||||||
use sc_core::proofs_circuits::{generate_commitments, generate_nullifiers, generate_nullifiers_se, pedersen_commitment_vec};
|
use sc_core::proofs_circuits::{
|
||||||
|
generate_commitments, generate_nullifiers, generate_nullifiers_se, pedersen_commitment_vec,
|
||||||
|
};
|
||||||
use sequencer_client::{json::SendTxResponse, SequencerClient};
|
use sequencer_client::{json::SendTxResponse, SequencerClient};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use storage::sc_db_utils::DataBlobChangeVariant;
|
use storage::sc_db_utils::DataBlobChangeVariant;
|
||||||
|
|||||||
@ -134,9 +134,9 @@ impl SequencerCore {
|
|||||||
let nullifier_tree_check = nullifier_created_hashes
|
let nullifier_tree_check = nullifier_created_hashes
|
||||||
.iter()
|
.iter()
|
||||||
.map(|nullifier_hash| {
|
.map(|nullifier_hash| {
|
||||||
self.store
|
self.store.nullifier_store.contains(&UTXONullifier {
|
||||||
.nullifier_store
|
utxo_hash: *nullifier_hash,
|
||||||
.contains(&UTXONullifier { utxo_hash: *nullifier_hash })
|
})
|
||||||
})
|
})
|
||||||
.any(|check| check);
|
.any(|check| check);
|
||||||
let utxo_commitments_check = utxo_commitments_created_hashes
|
let utxo_commitments_check = utxo_commitments_created_hashes
|
||||||
@ -185,7 +185,7 @@ impl SequencerCore {
|
|||||||
tx: TransactionMempool,
|
tx: TransactionMempool,
|
||||||
) -> Result<(), TransactionMalformationErrorKind> {
|
) -> Result<(), TransactionMalformationErrorKind> {
|
||||||
let Transaction {
|
let Transaction {
|
||||||
// ToDo: remove hashing of transactions on node side [Issue #66]
|
// ToDo: remove hashing of transactions on node side [Issue #66]
|
||||||
hash: _,
|
hash: _,
|
||||||
ref utxo_commitments_created_hashes,
|
ref utxo_commitments_created_hashes,
|
||||||
ref nullifier_created_hashes,
|
ref nullifier_created_hashes,
|
||||||
@ -199,9 +199,9 @@ impl SequencerCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for nullifier in nullifier_created_hashes.iter() {
|
for nullifier in nullifier_created_hashes.iter() {
|
||||||
self.store
|
self.store.nullifier_store.insert(UTXONullifier {
|
||||||
.nullifier_store
|
utxo_hash: *nullifier,
|
||||||
.insert(UTXONullifier{ utxo_hash: *nullifier});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
self.store.pub_tx_store.add_tx(tx.tx);
|
self.store.pub_tx_store.add_tx(tx.tx);
|
||||||
|
|||||||
@ -4,7 +4,8 @@ use accounts_store::SequencerAccountsStore;
|
|||||||
use block_store::SequecerBlockStore;
|
use block_store::SequecerBlockStore;
|
||||||
use common::{
|
use common::{
|
||||||
block::{Block, HashableBlockData},
|
block::{Block, HashableBlockData},
|
||||||
merkle_tree_public::merkle_tree::{PublicTransactionMerkleTree, UTXOCommitmentsMerkleTree}, nullifier::UTXONullifier,
|
merkle_tree_public::merkle_tree::{PublicTransactionMerkleTree, UTXOCommitmentsMerkleTree},
|
||||||
|
nullifier::UTXONullifier,
|
||||||
};
|
};
|
||||||
use rand::{rngs::OsRng, RngCore};
|
use rand::{rngs::OsRng, RngCore};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user