-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply rule to not allow BSQ outputs after BTC output for regular txs (#…
…3413) * Apply rule to not allow BSQ outputs after BTC output for regular txs * Enforce exactly 1 BSQ output for vote reveal tx * Fix missing balance and button state update * Refactor isBtcOutputOfBurnFeeTx method and add comments and TODOs No functional change. * Handle asset listing fee in custom method We need to enforce a BSQ change output As this is just tx creation code it has no consequences for the hard fork. * Use getPreparedBurnFeeTxForAssetListing * Update comments to not use dust output values * Fix missing balance and button state update * Use same method for asset listing fee and proof of burn Use same method for asset listing fee and proof of burn as tx structure is same. Update comments to be more general. * Use getPreparedProofOfBurnTx * Require mandatory BSQ change output for proposal fee tx. We had in the doc stated that we require a mandatory BSQ change output but it was not enforced in the implementation, causing similar issues as in Asset listing and proof of burn txs. * Add fix for not correctly handled issuance tx * Use new method for issuance tx // For issuance txs we also require a BSQ change output before the issuance output gets added. There was a // minor bug with the old version that multiple inputs would have caused an exception in case there was no // change output (e.g. inputs of 21 and 6 BSQ for BSQ fee of 21 BSQ would have caused that only 1 input was used // and then caused an error as we enforced a change output. This new version handles such cases correctly. * Handle all possible blind vote fee transactions * Move check for invalid opReturn output up * Add dust check at final sign method * Fix incorrect comments * Refactor - Remove requireChangeOutput param which is always false - Remove method which is used only by one caller - Cleanup * Add comment * Fix comments, rename methods * Move code of isBlindVoteBurnedFeeOutput to isBtcOutputOfBurnFeeTx
- Loading branch information
Showing
12 changed files
with
370 additions
and
76 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
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
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
Oops, something went wrong.