Skip to content
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

Checks for null data transaction before issuing error to debug.log #7200

Merged
merged 3 commits into from Dec 14, 2015

Conversation

@accraze
Copy link
Contributor

accraze commented Dec 12, 2015

CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves #6142

CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves #6142
@@ -1034,7 +1034,8 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,

// In either case, we need to get the destination address
CTxDestination address;
if (!ExtractDestination(txout.scriptPubKey, address))

if (!ExtractDestination(txout.scriptPubKey, address) && txout.scriptPubKey[0] != OP_RETURN)

This comment has been minimized.

Copy link
@jonasschnelli

jonasschnelli Dec 12, 2015

Member

Instead of checking txout.scriptPubKey[0] you should probably use CScript::IsUnspendable().

@jonasschnelli
Copy link
Member

jonasschnelli commented Dec 12, 2015

Concept ACK.

@accraze
Copy link
Contributor Author

accraze commented Dec 12, 2015

updated code to use CScript::IsUnspendable()

@sipa
Copy link
Member

sipa commented Dec 12, 2015

utACK

1 similar comment
@jonasschnelli
Copy link
Member

jonasschnelli commented Dec 14, 2015

utACK

@laanwj laanwj merged commit d812daf into bitcoin:master Dec 14, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
laanwj added a commit that referenced this pull request Dec 14, 2015
d812daf fix logic for error log (accraze)
c611acc wallet: check if tx scriptPubKey is unspendable (accraze)
b6915b8 checks for null data transaction before debug.log (accraze)
laanwj added a commit that referenced this pull request Dec 14, 2015
CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves #6142

Github-Pull: #7200
Rebased-From: b6915b8 c611acc d812daf
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves bitcoin#6142

Github-Pull: bitcoin#7200
Rebased-From: b6915b8
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
Github-Pull: bitcoin#7200
Rebased-From: d812daf
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
CWalletTx::GetAmounts could not find output address for null data transactions, thus issuing an error in debug.log. This change checks to see if the transaction is OP_RETURN before issuing error.

resolves bitcoin#6142

Github-Pull: bitcoin#7200
Rebased-From: b6915b8
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015
Github-Pull: bitcoin#7200
Rebased-From: d812daf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.