kaspad
kaspad copied to clipboard
Kaspawallet: implement fee calcs, centralize constant and logic
- Move fee calcs, logic and constants to libkaspawallet
- Allow for functions to calculate transaction(s) fees
Codecov Report
Merging #2107 (4c10273) into dev (b9093d5) will decrease coverage by
0.08%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## dev #2107 +/- ##
==========================================
- Coverage 59.19% 59.10% -0.09%
==========================================
Files 678 679 +1
Lines 32831 32854 +23
==========================================
- Hits 19434 19419 -15
- Misses 10596 10629 +33
- Partials 2801 2806 +5
Impacted Files | Coverage Δ | |
---|---|---|
...allet/daemon/server/create_unsigned_transaction.go | 0.00% <0.00%> (ø) |
|
...pawallet/daemon/server/external_spendable_utxos.go | 0.00% <0.00%> (ø) |
|
cmd/kaspawallet/daemon/server/split_transaction.go | 7.64% <0.00%> (ø) |
|
cmd/kaspawallet/libkaspawallet/fees.go | 0.00% <0.00%> (ø) |
|
cmd/kaspawallet/parse.go | 0.00% <0.00%> (ø) |
|
cmd/kaspawallet/sweep.go | 0.00% <0.00%> (ø) |
|
...tructure/network/rpcclient/rpc_on_chain_changed.go | 52.38% <0.00%> (-14.29%) |
:arrow_down: |
...k/netadapter/server/grpcserver/connection_loops.go | 56.89% <0.00%> (-5.18%) |
:arrow_down: |
...ructure/network/rpcclient/grpcclient/grpcclient.go | 76.56% <0.00%> (-4.69%) |
:arrow_down: |
infrastructure/network/netadapter/router/route.go | 72.72% <0.00%> (-4.55%) |
:arrow_down: |
... and 2 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b9093d5...4c10273. Read the comment docs.
Converting back to draft: Makes more sense to optionally return the whole tx, this can be used by clients to send, and get tx data for post-analysis, no reason to limit this feature in the Send
call to just return fees.
I will split this into two dependent prs, one for feecalcs, one for sending back whole tx data, seems to make the most sense.