mirror of https://github.com/oxen-io/oxen-core.git
f87dfd0d51
The CLI wallets `print_locked_stakes` was buggy, overly verbose, and missing pertinent information. This overhauls it. Details are below; the quick differences: - show the staking requirement - make key image output optional with a +key_images flag on the command - fix various bugs such as just showing the first contribution as the "total" contribution - add the wallet address of extra contributions, rather than just the key image with no other info. - put your own contributions first, and mark them as such - show totals of other contributors - sort service nodes to put unlocking nodes first; among unlocking and non-unlocking nodes we sort by hex pubkey string. - sort locked dereg outputs by unlock height - considerable reformatting of how things are displayed --- Output now looks like this: First we have 1-2 lines of general info: Service Node: abcdef123456... Unlock Height: 1234567 (omitted if not unlocking) If there are other contributors then we print a total line such as: Total Contributions: 15000 OXEN of 15000 OXEN required For our own contribution, when we have a single contribution, we use one of: Your Contribution: 5000 OXEN (Key image: abcdef123...) Your Contribution: 5000 OXEN of 15000 OXEN required (Key image: abcdef123...) (the second one applies if we are the only contributor so far). If we made multiple contributions then: Your Contributions: 5000 OXEN in 2 contributions: Your Contributions: 5000 OXEN of 15000 OXEN required in 2 contributions: (the second one if we are the only contributor so far). This is followed by the individual contributions: ‣ 4000.5 OXEN (Key image: abcdef123...) ‣ 999.5 OXEN (Key image: 789cba456...) If there are other contributors then we also print: Other contributions: 10000 OXEN from 2 contributors: • 1234.565 OXEN (T6U7YGUcPJffbaF5p8NLC3VidwJyHSdMaGmSxTBV645v33CmLq2ZvMqBdY9AVB2z8uhbHPCZSuZbv68hE6NBXBc51Gg9MGUGr) Key image 123456789... • 8765.435 OXEN (T6Tpop5RZdwE39iBvoP5xpJVoMpYPUwQpef9zS2tLL8yVgbppBbtGnzZxzkSp53Coi88wbsTHiokr7k8MQU94mGF1zzERqELK) ‣ 7530 OXEN (Key image: 23456789a...) ‣ 1235.435 OXEN (Key image: 3456789ab...) If we aren't showing key images then all the key image details get omitted. --- Locked key images get overhauled too; it wasn't at all clear from the output *why* these are locked (i.e. these are locked contributions of failed SNs): Locked Stakes due to Service Node Deregistration: ‣ 234.567 OXEN (Unlock height 1234567; Key image: abcfed999...) ‣ 5000 OXEN (Unlock height 123333; Key image: cbcfef989...) |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
simplewallet-mms.inl | ||
simplewallet.cpp | ||
simplewallet.h |