Provide loop with a configuration option that specifies a global defensive fee check for sweep transaction that the client initiates. This should be applicable to any bitcoin transaction the client might publish.
The config option should express the maximum ratio of fees to transaction output amount that is permisable.
A value of 0.05 would denote that the client will only publish transactions with <5% fees of the amount of the transaction itself.
Samples where this option could be used:
|
return nil, errors.New("fee is higher than 20% of " + |
|
fee, err := s.sweeper.GetSweepFee( |