elements icon indicating copy to clipboard operation
elements copied to clipboard

Ways to reduce divergence with upstream, to ease merging

Open gwillen opened this issue 3 years ago • 1 comments

There is some discussion about this in various places (#935, #964), but I wanted to make a dedicated issue to propose things I'm running into while reviewing merges in #935.

One thing I've talked to someone about, I forget who -- right now in our build stuff (configure/make), a lot of things were renamed from 'bitcoin' to 'elements', but also a lot of things were not. I think probably the thing that would make this easiest for future maintenance would be to minimize the diff from upstream, by ONLY using 'elements' in places where it's user-facing (file/directory/target names), and revert all the names of purely-internal variables (some of which were changed, and some of which were not) back to 'bitcoin'.

gwillen avatar Mar 19 '21 23:03 gwillen

Another change I know we've considered is to rip out g_con_elementsmode, and always run as though it were true (which it always is, with IIRC one exception that is either gone or I think we're happy to get rid of.)

This obviously doesn't reduce divergence from upstream, but I suspect it will ease merging, by removing an extra layer of indentation around certain blocks that upstream doesn't have, and removing duplicated code in certain places where it may confuse diff.

EDIT: If there are large contiguous blocks of code from Core that we know can't execute in "elements mode" (e.g. signet), but removing it makes the diffs messier, we could just wrap it in "#if 0", so the text is preserved unmodified, but it vanishes at compile-time never to be seen again.

gwillen avatar Mar 20 '21 00:03 gwillen