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

replace smart_ref with shared_ptr #1556

Merged
merged 7 commits into from
Feb 18, 2019
Merged

replace smart_ref with shared_ptr #1556

merged 7 commits into from
Feb 18, 2019

Conversation

jmjatlanta
Copy link
Contributor

@jmjatlanta jmjatlanta commented Feb 5, 2019

Potential fix for #1548

The use of fc::smart_ref was to allow for compilation of current_fees while there is a circular reference between fee_schedule, chain_parameters, and operations. But its use is problematic (build errors).

One potential replacement was to switch to unique_ptr. Unfortunately, this does not permit circular references (no copies allowed, full implementation needed for destruction).

shared_ptr will allow circular references. This PR uses shared_ptr to replace fc::smart_ref

@abitmore abitmore added this to the Future Feature Release milestone Feb 5, 2019
pmconrad
pmconrad previously approved these changes Feb 6, 2019
@jmjatlanta
Copy link
Contributor Author

I believe all to be fine with this PR, but am attempting to test some backward-compatibility stuff, to assure that nodes with and without this change still play well together. When testing is complete, I will merge this in.

@jmjatlanta jmjatlanta merged commit 34c5ad3 into develop Feb 18, 2019
@jmjatlanta jmjatlanta deleted the jmj_1548 branch February 18, 2019 10:46
@abitmore abitmore removed this from the Future Consensus-Upgrade Release milestone Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants