2018-07-12 19:31:18
https://github.com/snowblossomcoin/snowblossom/blob/newclient/NEW_CLIENT.md ```
The new client is super cool.
# Key Pool
The client now maintains a pool of unused addresses and generates more as needed. The default key pool size is 100.
You can change it with the key_pool_size parameter in your config.
# Wallet Files
As you may have noticed, the client config has always specified a directory that contains the wallet files rather than a specific wallet
file. This is why. Now wallets are sometimes multiple files. This allows the client to quickly write any new changes (like a new key
or marking an address as used) to a new file. If that gets interupted or fails that is completely fine because the existing files
are still there. On startup, a client reads all the files present in the directory, merges them in memory and writes out a new file
of everything those source files contains. Only after that new complete merge is created, the old files can be safely removed.
This all happens automatically, you don't have to worry about it.
If you look in your wallet directory you might see something like this:
* snow-2_05797c77068c.wallet
* snow-2_1fda3b142533.wallet
or just a single file.
## Upgrading
To upgrade from the old wallet file, you don't need to do anything. The new client will automatically read the old wallet.db, generate
the new keypool and move on.
## Downgrading
If you wish to go back to the old client, run the new client a few times until it merges everything into a single file
and rename that file back to wallet.db. Then you can run the old client without trouble.
## Future Upgrades
Each file has a built in version number, (also shown as the number after 'snow-'). If a client reads a file with a version number
it doesn't recognize, it reads it and merges it as normal but does not delete the new file. It assumes the new versioned file has some
new fields that it doesn't know how to operate on and leaves it. This way it will still be there when the user runs the new client again
that knows how to read and merge it.
This is all automatic, you don't need to worry about it.
## Syncing
One awesome advantage of doing the wallet files in this way is that you can rsync these around or run multiple clients at once.
Any changes by any clients will be written to new file names and the merge will happen just fine when a client reads those.
# Commands
* balance - show balance of all addresses
* send <amount> <destination>
* monitor - show balance and wait and repeat
* getfresh \[mark_used\] \[generate_now\] - Get an unused address.
* If mark_used is true, the returned address will be marked as used so it won't get given out or used as change.
* If generate now is true, then a completely new address will be generated right now rather than one from the keypool.
```
Fireduck