I'm trying to produce a SHA256 altcoin which is merge mined with Bitcoin. I'd like to use some recent code, rather than base in on a 0.8.* or earlier codebase. I've found this source: https://github.com/sidhujag/bitcoin-0.9.2-Merge-Mining-fork
However, it's based on Devcoin, so it sends some of the mining proceeds to other parties. I'm finding it very difficult to extract this feature, while keeping the merged mining. For instance, in the miner.cpp file I've modified the CreateNewBlock function to remove the "Prepare to pay beneficiaries" section, but when I do so the compiled code segfaults.
Thanks to anyone who can help with this.
EDIT: I've run the node with GDB, this is the error and backtrace:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffd49e4700 (LWP 2385)] 0x000055555562ca50 in CreateNewBlock (scriptPubKeyIn=...) at miner.cpp:375 375 pblock->vtx.vout.nValue = GetBlockValue(pindexPrev->nHeight+1, nFees); (gdb) backtrace #0 0x000055555562ca50 in CreateNewBlock (scriptPubKeyIn=...) at miner.cpp:375 #1 0x000055555562dc4f in CreateNewBlockWithKey (reservekey=...) at miner.cpp:513 #2 0x000055555562de51 in GreedycoinMiner (pwallet= 0x555556502c70) at miner.cpp:597 #3 0x00007ffff7547a4a in boost::(anonymous namespace)::thread_proxy (param=<optimized out>) at libs/thread/src/pthread/thread.cpp:164 #4 0x00007ffff5cc2182 in start_thread (arg=0x7fffd49e4700) at pthread_create.c:312 #5 0x00007ffff59ef30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111