-
Notifications
You must be signed in to change notification settings - Fork 184
Remove bOPReturnEnabled and correct handling of OP_RETURN #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This removes the bOPReturnEnabled flag and corrects the handling of OP_RETURN outputs.
| { | ||
| for (auto const& txout : wtx.vout) | ||
| { | ||
| if (txout.scriptPubKey == (CScript() << OP_RETURN)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logic behind this is that if any tx with multiple txs contains this with no address in scriptpubkey it will display in all wallets. This allows OP_RETURN to be used with data in a transaction still however if its only a OP_RETURN and no valid address we just don't show the transaction.
The gibberish address we experienced and saw is the checksum of null for an address. Other coins experienced similar in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 484d5f7
tested and worked correctly in gui and rpc. balance also shows correctly.
|
Also rebased to dev and tested "burn 5". Transaction was successful and shows correctly, as it is supposed to if it originates from you. |
Fixed - Fix burned coins incorrectly showing up in wallets, #1283 (@jamescowens). - Fix decimal output in RPC commands, #1272 (@Foggyx420). - Fix verbose flag in `getrawtransaction` RPC output, #1271 (@jamescowens).
|
You saved the day @jamescowens . |
|
Not really. An inelegant solution as a temporary measure... The removal of the flag and changes to IsMine and ExtractDestination are spot on. The filter loop on transaction display is inelegant, and as you mentioned, should probably be removed once we develop a repair command to remove the UTXO's out of everyone's wallets. |
This removes the bOPReturnEnabled flag and corrects
the handling of OP_RETURN outputs.
Note TX_NULL_DATA behavior is corrected.
Unfortunately a vout loop is required in TransactionRecord::showTransaction(const CWalletTx &wtx) to suppress the transactions that are not IsFromMe() and have a vout that is OP_RETURN. Inelegant, but effective.