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

Optimise calls to HaveJoinSplitRequirements #2972

Open
str4d opened this issue Feb 21, 2018 · 1 comment
Open

Optimise calls to HaveJoinSplitRequirements #2972

str4d opened this issue Feb 21, 2018 · 1 comment
Labels
A-consensus Area: Consensus rules C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-performance Problems and improvements with respect to performance

Comments

@str4d
Copy link
Contributor

str4d commented Feb 21, 2018

Currently we call HaveJoinSplitRequirements both in CheckTxInputs (which is called by ContextualCheckInputs), and directly inside AcceptToMemoryPool and ConnectBlock. This means that the check inside CheckTxInputs should never fail, assuming there are no other call paths and we are locking correctly. We should check this, and if we can then we should remove redundant calls.

@str4d str4d added I-performance Problems and improvements with respect to performance C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-consensus Area: Consensus rules labels Feb 21, 2018
zkbot added a commit that referenced this issue Mar 6, 2018
…try>

Remove redundant HaveJoinSplitRequirements function call

Fixes #2972.
@bitcartel
Copy link
Contributor

#3043 (comment)

Concept NACK. CheckTxInputs is called by test coins_tests.cpp where:

HaveJoinSplitRequirements is called once and therefore not redundant
Tests expect both success and failure, and in future, a developer could add tests where input data contains invalid joinsplits.

@mms710 mms710 added this to PRs That Need Review + Their Associated Issues in Arborist Team Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rules C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-performance Problems and improvements with respect to performance
Projects
Arborist Team
  
PRs That Need Review + Their Associat...
Performance
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

3 participants