Skip to content

Commit

Permalink
minors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Dec 17, 2024
1 parent 510b829 commit 1b91539
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions chain/src/repository/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ mod tests {

insert_tokens(conn, vec![token.clone()])?;

seed_blocks_from_balances(conn, &vec![balance.clone()])?;
seed_blocks_from_balances(conn, &[balance.clone()])?;

insert_balances(conn, vec![balance.clone()])?;

Expand Down Expand Up @@ -180,7 +180,7 @@ mod tests {
..(balance.clone())
};

seed_blocks_from_balances(conn, &vec![new_balance.clone()])?;
seed_blocks_from_balances(conn, &[new_balance.clone()])?;
insert_balances(conn, vec![new_balance])?;

let queried_balance =
Expand Down Expand Up @@ -418,7 +418,7 @@ mod tests {

insert_tokens(conn, vec![token.clone()])?;

seed_blocks_from_balances(conn, &vec![balance.clone()])?;
seed_blocks_from_balances(conn, &[balance.clone()])?;
insert_balances(conn, vec![balance.clone()])?;

let queried_balance = query_balance_by_address(conn, owner, token)?;
Expand Down Expand Up @@ -515,10 +515,10 @@ mod tests {

fn seed_blocks_from_balances(
conn: &mut PgConnection,
balances: &Vec<Balance>,
balances: &[Balance],
) -> anyhow::Result<()> {
for height in balances
.into_iter()
.iter()
.map(|balance| balance.height as i32)
.collect::<HashSet<_>>()
{
Expand Down
3 changes: 3 additions & 0 deletions shared/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ pub struct Block {
pub hash: Id,
pub header: BlockHeader,
pub transactions: Vec<(WrapperTransaction, Vec<InnerTransaction>)>,
pub epoch: Epoch
}

impl Block {
Expand All @@ -112,6 +113,7 @@ impl Block {
block_results: &BlockResult,
proposer_address_namada: &Option<Id>, // Provide the namada address of the proposer, if available
checksums: Checksums,
epoch: Epoch,
block_height: BlockHeight,
) -> Self {
let transactions = block_response
Expand Down Expand Up @@ -152,6 +154,7 @@ impl Block {
app_hash: Id::from(&block_response.block.header.app_hash),
},
transactions,
epoch
}
}

Expand Down
1 change: 1 addition & 0 deletions transactions/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ async fn crawling_fn(
&block_results,
&proposer_address_namada,
checksums,
1_u32, // placeholder, we dont need the epoch here
block_height,
);

Expand Down

0 comments on commit 1b91539

Please sign in to comment.