stratumn / go-core

Stratumn's core utilities to create decentralized applications and networks
Apache License 2.0
0 stars 0 forks source link

Fix fossilizer issue where utxo inputs are lower than transaction fee #525

Closed simonvadee closed 5 years ago

simonvadee commented 5 years ago

I couldn't find a proper solution to the issue so I used a quickfix instead. The issue is described in detail with the fix. The drawback to this solution is that UTXOs that are lower than the transaction fee (15000 satoshis) will never be used by the fossilizer, and we'll have to manually "merge" them from time to time (create a transaction from some wallet with all the low UTXO as inputs and only one UTXO as output, to the same address).


This change is Reviewable

codecov[bot] commented 5 years ago

Codecov Report

Merging #525 into master will increase coverage by 0.04%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #525      +/-   ##
==========================================
+ Coverage   71.61%   71.66%   +0.04%     
==========================================
  Files         100      100              
  Lines        5623     5632       +9     
==========================================
+ Hits         4027     4036       +9     
  Misses       1228     1228              
  Partials      368      368
Impacted Files Coverage Δ
blockchain/btc/btc.go 95.23% <ø> (ø) :arrow_up:
blockchain/btc/btctimestamper/btctimestamper.go 70.49% <100%> (+2.35%) :arrow_up:
blockchain/btc/blockcypher/blockcypher.go 66.15% <100%> (ø) :arrow_up:

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 5b3ee15...20a2d85. Read the comment docs.