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

Projects
None yet
4 participants
@accraze
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

checks for null data transaction before debug.log
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
Show outdated Hide outdated src/wallet/wallet.cpp
@@ -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.

@jonasschnelli

jonasschnelli Dec 12, 2015

Member

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

@jonasschnelli

jonasschnelli Dec 12, 2015

Member

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

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Dec 12, 2015

Member

Concept ACK.

Member

jonasschnelli commented Dec 12, 2015

Concept ACK.

@accraze

This comment has been minimized.

Show comment
Hide comment
@accraze

accraze Dec 12, 2015

Contributor

updated code to use CScript::IsUnspendable()

Contributor

accraze commented Dec 12, 2015

updated code to use CScript::IsUnspendable()

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Dec 12, 2015

Member

utACK

Member

sipa commented Dec 12, 2015

utACK

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli
Member

jonasschnelli commented Dec 14, 2015

utACK

@laanwj laanwj merged commit d812daf into bitcoin:master Dec 14, 2015

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

Merge pull request #7200
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

Checks for null data transaction before issuing error to debug.log
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

checks for null data transaction before debug.log
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

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

fix logic for error log
Github-Pull: #7200
Rebased-From: d812daf

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 28, 2015

checks for null data transaction before debug.log
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

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

fix logic for error log
Github-Pull: #7200
Rebased-From: d812daf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment