Skip to content

Conversation

@furszy
Copy link

@furszy furszy commented Jun 10, 2020

Coming from bitcoin#6061

Refactor needed for an upcoming work, no functional changes.

Had to do something little bit dirty to be able to get Consensus::Params from inside the Consensus namespace (struct Params name clashes with global method Params()) and not have any functional change there.

Point of discussion for a later PR: could be moved to a function argument or check if there is another workaround to distinguish between the name clash.

@furszy furszy self-assigned this Jun 10, 2020
@random-zebra
Copy link

While the Params struct belongs the Consensus namespace, the Params() function does not, it's in the global namespace.
So, to avoid confusion, if you want to call it from within Consensus::CheckTxInputs(), it should be sufficient to simply refer to the global space resolution, like:

const Consensus::Params& consensus = ::Params().GetConsensus();

@furszy furszy force-pushed the 2020_checkTxInputs_split branch from 410031f to e27420e Compare June 10, 2020 22:27
@furszy
Copy link
Author

furszy commented Jun 10, 2020

Nice :) , travis loves you @random-zebra

@Fuzzbawls Fuzzbawls changed the title Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs Separate Consensus CheckTxInputs and GetSpendHeight in CheckInputs Jun 14, 2020
@Fuzzbawls Fuzzbawls changed the title Separate Consensus CheckTxInputs and GetSpendHeight in CheckInputs [Core] Separate Consensus CheckTxInputs and GetSpendHeight in CheckInputs Jun 14, 2020
@furszy furszy requested review from Fuzzbawls and random-zebra June 15, 2020 03:59
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

utACK e27420e

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

utACK e27420e

@Fuzzbawls Fuzzbawls merged commit a5ba720 into PIVX-Project:master Jun 17, 2020
@furszy furszy deleted the 2020_checkTxInputs_split branch November 29, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants