Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use correct index for collateral return #94

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = ["Santiago Carmuega <santiago@carmuega.me>"]


[dependencies]
pallas = "0.14.0-alpha.3"
pallas = "0.14.0-alpha.4"
# pallas = { path = "../pallas/pallas" }
# pallas = { git = "https://github.com/txpipe/pallas.git" }
hex = "0.4.3"
Expand Down
2 changes: 1 addition & 1 deletion src/enrich/sled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl Worker {
let mut insert_batch = sled::Batch::default();

for tx in txs.iter() {
for (idx, output) in tx.produces().iter().enumerate() {
for (idx, output) in tx.produces() {
let key: IVec = format!("{}#{}", tx.hash(), idx).as_bytes().into();

let era = tx.era().into();
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/address_by_ada_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Reducer {
output: &mut super::OutputPort,
) -> Result<(), gasket::error::Error> {
for tx in block.txs().iter() {
for txo in tx.produces() {
for (_, txo) in tx.produces() {
self.process_txo(&txo, output)?;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/balance_by_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ impl Reducer {
self.process_consumed_txo(&ctx, &consumed, output)?;
}

for produced in tx.produces().iter() {
self.process_produced_txo(produced, output)?;
for (_, produced) in tx.produces() {
self.process_produced_txo(&produced, output)?;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/utxo_by_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ impl Reducer {
self.process_consumed_txo(&ctx, &consumed, output)?;
}

for (idx, produced) in tx.produces().iter().enumerate() {
self.process_produced_txo(&tx, produced, idx, output)?;
for (idx, produced) in tx.produces() {
self.process_produced_txo(&tx, &produced, idx, output)?;
}
}

Expand Down