This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
Add transaction size tests. No problem identified. #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the issue identified in Vesta-wallet/bitcoin_flutter#2, I examined the library for inconsistent transaction size.
I tested the size reported for two transactions that used incorrect fees from the flutter app and found that the sizes were reported correctly by this library. I also tested the size of a transaction created using TransactionBuilder and found that the size is correct.
I ran the tests over a 100 times each and the size was always reported correctly.
I suspect the incorrect fee may not be caused by an incorrect size value but due to a problem with the flutter app . The app uses a two-pass system. One pass is to determine the fee and a second pass completes the transaction. The size may be different during the second pass.