Skip to content

rpc, wallet: add abandoned field for all categories of transaction in ListTransaction - #25158

Merged
achow101 merged 2 commits into
bitcoin:masterfrom
brunoerg:2022-05-abandoned-listtransactions
Apr 26, 2023
Merged

rpc, wallet: add abandoned field for all categories of transaction in ListTransaction#25158
achow101 merged 2 commits into
bitcoin:masterfrom
brunoerg:2022-05-abandoned-listtransactions

Conversation

@brunoerg

Copy link
Copy Markdown
Contributor

Fixes #25130

@DrahtBot

DrahtBot commented May 18, 2022

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK achow101

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

No conflicts as of last run.

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick readover of the code as a break from seminar readings, but a key point would be to consider why this field was not returned other than for sent txns (and if concept ACKs, ensure there is appropriate test coverage in the tests that assert on this field. Quick grep:)

test/functional/feature_backwards_compatibility.py:197:                        assert not(txs[1]["abandoned"])
test/functional/feature_backwards_compatibility.py:200:                        assert txs[3]["abandoned"]
test/functional/wallet_abandonconflict.py:197:            assert_equal(tx["abandoned"], False)
test/functional/wallet_abandonconflict.py:202:        assert_equal(double_spend["abandoned"], False)
test/functional/wallet_abandonconflict.py:131:            assert_equal(tx['abandoned'], True)

Comment thread doc/release-notes.md Outdated
Comment thread src/wallet/rpc/transactions.cpp Outdated
@brunoerg

brunoerg commented May 18, 2022

Copy link
Copy Markdown
Contributor Author

a key point would be to consider why this field was not returned other than for sent txns

I couldn't find any resources about it, i'd like to understand more, btw Concept NACKs are welcome! I find #7739 which added this field but there is no explanation about why it is only in send.

@brunoerg
brunoerg force-pushed the 2022-05-abandoned-listtransactions branch from 6ef89bf to c3450ad Compare May 18, 2022 13:34
@brunoerg

Copy link
Copy Markdown
Contributor Author

Force-pushed addressing @jonatack's comments

Comment thread src/wallet/rpc/transactions.cpp Outdated
@achow101

Copy link
Copy Markdown
Member

Are you still working on this?

@brunoerg

brunoerg commented Jan 6, 2023

Copy link
Copy Markdown
Contributor Author

Are you still working on this?

Yes.

@brunoerg
brunoerg force-pushed the 2022-05-abandoned-listtransactions branch from 7e5a8a2 to efdb80a Compare January 6, 2023 13:46
@achow101

Copy link
Copy Markdown
Member

ACK efdb80a69000572a5f36fc702090da99c627238d

I think it's reasonable to output this for all transactions, even if we decide that one type cannot be abandoned. A trivial case where this is useful are send-to-self transactions as these show up as individual send and receive transactions.

@maflcko

maflcko commented Jan 13, 2023

Copy link
Copy Markdown
Member

You will have to modify the RPC docs for gettransaction as well

@brunoerg
brunoerg force-pushed the 2022-05-abandoned-listtransactions branch from efdb80a to 0c52067 Compare January 13, 2023 13:29
@brunoerg

Copy link
Copy Markdown
Contributor Author

You will have to modify the RPC docs for gettransaction as well

Nice find, thanks! Force-pushed modifying it.

@achow101

Copy link
Copy Markdown
Member

re-ACK 0c52067

@fanquake
fanquake requested a review from Sjors February 8, 2023 11:21
@achow101
achow101 merged commit 91ccb62 into bitcoin:master Apr 26, 2023
@bitcoin bitcoin locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gettransaction does not contain the field "abandoned" for abandoned receiving tx

7 participants