Skip to content

Fix fee calculation in bitcoind client#25

Merged
dcdpr merged 4 commits into
mainfrom
fix/bitcoind-fee-calculation
Apr 11, 2026
Merged

Fix fee calculation in bitcoind client#25
dcdpr merged 4 commits into
mainfrom
fix/bitcoind-fee-calculation

Conversation

@parasyte
Copy link
Copy Markdown
Collaborator

@parasyte parasyte commented Apr 11, 2026

When using the bitcoind client for transaction resolution, the fee calculation was completely wrong. Every previous output was considered the fee.

The fix is calculating the fee as the difference between the transaction outputs and the previous outputs.

The issue is that the `Sub` and `Sum` traits cannot have their generic
parameter types unified automatically. Both types must be specified.

Alternatively, specifying the `Sum` parameter types on separate bindings
allows the compiler to correctly infer the `Sub` parameter type.
@dcdpr dcdpr merged commit 88ec5e3 into main Apr 11, 2026
1 check passed
@dcdpr dcdpr deleted the fix/bitcoind-fee-calculation branch April 11, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants