libplanet
libplanet copied to clipboard
Expose `BlockLocator`
It will be great if we can remove this and make
Libplanet
internals used inLibplanet.Net
public.Originally posted by @limebell in https://github.com/planetarium/libplanet/pull/1760#discussion_r792261018
Currently Libplanet allows Libplanet.Net to see its internals in order to keep BlockLocator
internal. However, it would be better if it is exposed as a public class instead.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This issue is extreamly easy.
The goal of this issue is not to focus on understanding the structure of libplanet, but rather to follow the process of contributing to libplanet. We are looking forward to familiarizing you with the changelog or lint.
Is the objective of this issue simply making the class BlockLocator
public, or removing the lines:
[assembly: InternalsVisibleTo("Libplanet.Net")]
[assembly: InternalsVisibleTo("Libplanet.Net.Tests")]
?
I'm asking because if it's the former it would be really simple, but in case of the latter, the members of the class BlockChain
Swap(other, render, stateCompleters)
, TipChanged
, Store
, Append(block, evaluateActions, renderBlocks)
, FindNextHashes(locator, stop, count)
, Fork(point, inheritRenderers
, GetBlockLocator(threshold)
, IterateBlockHashes(offset, limit)
must also be made public, and the code must be swapped around due to the fact that public members should precede the internal members. I wasn't so sure if this is what you would have wanted.
The goal of this issue is not to focus on understanding the structure of libplanet, but rather to follow the process of contributing to libplanet.
Baby steps. 🙂
As the original https://github.com/planetarium/libplanet/pull/1760#discussion_r792261018 suggest, the goal is eventually to decouple Libpanet
and Libplanet.Net
, but doing so in one go would be rather hard as you've mentioned.
For now, I think just making partially mentioned entities public
and moving around some chunks to pass code analysis would be fine. 😗