Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #30: Calculate fee with only used unspents, warn about default …
…fee (#32) Before this commit there was an issue where combine=False send()'s would calculate the fee with all unspents. Now it will recalculate the fee as it goes along adding unspents to use the minimum number of unspents and the smallest fee. Note that is this is very unoptimized and some unspents add more fees than they are worth. Adds one test case that was not broken before this point and another for validating that additional, unnecessary unspents do not raise the fee. Also introduce logging, add warnings if the fee API cannot be reached and the default or cached is used. The warnings will only be seen in some cases depending on the logging level set, but are always caught with failing test cases and can further aid in debugging.
- Loading branch information
Showing
4 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.log | ||
*.pyc | ||
*.orig | ||
/.cache | ||
/.idea | ||
/.coverage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters