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

Add information about number of our inputs to the history #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions src/rows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
pub height: TxStatus<BlockHeight>,
// TODO: Add date/time
pub operation: OpType,
pub our_inputs: Vec<u32>,
pub counterparties: Vec<(Counterparty, i64)>,
pub own: Vec<(DerivedAddr, i64)>,
pub txid: Txid,
Expand Down Expand Up @@ -164,6 +165,12 @@
let mut row = TxRow {
height: tx.status.map(|info| info.height),
operation: OpType::Credit,
our_inputs: tx
.inputs
.iter()
.enumerate()
.filter_map(|(idx, inp)| inp.derived_addr().map(|_| idx as u32))
.collect(),

Check warning on line 173 in src/rows.rs

View check run for this annotation

Codecov / codecov/patch

src/rows.rs#L168-L173

Added lines #L168 - L173 were not covered by tests
counterparties: none!(),
own: none!(),
txid: tx.txid,
Expand Down
Loading