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

refactor: Expose UndoReadFromDisk in header #15623

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Mar 19, 2019

It is not possible to calculate the fee of a non-mempool transaction in RPCs unless txindex is active or the prevtxs are passed in through the RPC.

Fix that issue for confirmed txs by exposing UndoReadFromDisk in the header file.

This pull is a requirement for

Copy link
Member

@jamesob jamesob left a comment

Choose a reason for hiding this comment

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

utACK faad977

@practicalswift
Copy link
Contributor

utACK faad977

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 19, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #14121 (Index for BIP 157 block filters by jimpo)
  • #14053 (Add address-based index (attempt 4?) by marcinja)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Contributor

@jimpo jimpo left a comment

Choose a reason for hiding this comment

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

Concept ACK

@@ -1515,6 +1513,8 @@ static bool UndoReadFromDisk(CBlockUndo& blockundo, const CBlockIndex *pindex)
return true;
}

namespace {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this anonymous namespace still necessary? The two methods inside it are both static.

@maflcko maflcko force-pushed the 1903-UndoReadFromDiskHeader branch from faad977 to fa11c03 Compare March 19, 2019 18:20
@maflcko
Copy link
Member Author

maflcko commented Mar 19, 2019

Removed namespace, as requested by @jimpo

@jamesob
Copy link
Member

jamesob commented Mar 19, 2019

re-utACK fa11c03

@jimpo
Copy link
Contributor

jimpo commented Mar 19, 2019

utACK fa11c03

1 similar comment
@FelixWeis
Copy link
Contributor

utACK fa11c03

@practicalswift
Copy link
Contributor

utACK fa11c03

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK fa11c03, makes sense

@maflcko maflcko merged commit fa11c03 into bitcoin:master Mar 20, 2019
maflcko pushed a commit that referenced this pull request Mar 20, 2019
fa11c03 refactor: Expose UndoReadFromDisk in header (MarcoFalke)

Pull request description:

  It is not possible to calculate the fee of a non-mempool transaction in RPCs unless txindex is active or the prevtxs are passed in through the RPC.

  Fix that issue for confirmed txs by exposing `UndoReadFromDisk` in the header file.

  This pull is a requirement for
  * rpc: faster getblockstats using BlockUndo data #14802
  *  Index for BIP 157 block filters #14121
  * my local patches

Tree-SHA512: 859ea5f2dfb4feac612b50faeb0e2b6c07b83f1d983e519d7647a78058d85c0390fd09ec66b460ae7a4c3b273e81b0013ee9f4bb8dfba0c4782ffaa1fa453ea6
@maflcko maflcko deleted the 1903-UndoReadFromDiskHeader branch June 11, 2019 12:43
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Sep 3, 2019
Github-Pull: bitcoin#15623
Rebased-From: fa11c03 (diff minimised)
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 1, 2020
Summary:
bitcoin/bitcoin@fa11c03

---

Backport of Core [[bitcoin/bitcoin#15623 | PR15623]]

Test Plan:
  ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6304
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary:
bitcoin/bitcoin@fa11c03

---

Backport of Core [[bitcoin/bitcoin#15623 | PR15623]]

Test Plan:
  ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6304
kwvg added a commit to kwvg/dash that referenced this pull request Aug 2, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 8, 2021
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Aug 11, 2021
kwvg added a commit to kwvg/dash that referenced this pull request Aug 12, 2021
UdjinM6 added a commit to dashpay/dash that referenced this pull request Aug 13, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

7 participants