fix issue with --satpoint
when offset > 0. (Fix #2465)
#2466
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.
the prevouts being used to construct the reveal signature is:
but using
unsigned_commit_tx.output[0]
as one of its elements is a wrong assumption since a inscribe run can be called using--satpoint
with offset > 0, which would make the first output of the commit transaction to be a change (part not used of the satpoint), and not the output encoding the taproot spending condition.Example of a inscribe using
![image](https://private-user-images.githubusercontent.com/37600416/269815832-d884819b-8b70-448a-ad2b-319ef30c1df5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzIwNDksIm5iZiI6MTczOTI3MTc0OSwicGF0aCI6Ii8zNzYwMDQxNi8yNjk4MTU4MzItZDg4NDgxOWItOGI3MC00NDhhLWFkMmItMzE5ZWYzMGMxZGY1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDExMDIyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTExMzRkZTFiZjg0MTI2MzRmODQ5ZDc3ZDk5NTFjNmY4ZjZlNWNkYzQ0ODI4Y2Q4N2Y4OTViZjM0OGI2ZTQ5YTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.hLJ5GcCtl2bA5qs8RkwzQItWOfAWrsGg9nuv0oM2D4c)
--satpoint=cad80aa153050fa300fc539e35fbb2046f4c99d3e09b27437db2232bfec43f71:2:1000
(example produced building ord with the code from this pr. https://mempool.space/pt/testnet/tx/aab6b689ec23b60e0943adf6357eb3a2cdb8c50ebfaf10cb972f96155a239f4b#flow=&vout=1)
In this case,
unsigned_commit_tx.output[0]
is the first output with1000sat
valuethis pr fix #2465