Is it possible to run the wallet in a debugger and watch how it works?
Yes.
Sure there is. Follow the instructions at
https://github.com/yacoin/yacoin/blob/master/doc/build-msw.txt. At step 26 use Makefile.Debug instead of Makefile.Release
...
1381 static unsigned int nStakeSplitAge = (60 * 60 * 24 * 90);
...
This will take longer then usual because we are running in debug mode. When it finally fires up you will get:
Breakpoint 1,CWallet::CreateCoinstake......
(gdb) list
......
(gdb) n
1384 CBigNum +;
(gdb) print +
$1 = 7776000
(gdb)
Note that 7,760,000 is = 60 * 60 * 24 * 90 seconds I presume??? And further, if one searches the sources one finds that CBigNum bnTargetPerCoinDay is instantiated locally in CheckStakeKernelHash() in kernel.cpp and in CWallet::CreateCoinStake() in wallet.cpp. Though interestingly, the latter doesn't seem to be used!?
Ron