Hush lite wallet
https://faq.hush.is/sdl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
728 B
37 lines
728 B
#ifndef TURNSTILE_H
|
|
#define TURNSTILE_H
|
|
|
|
|
|
#include "precompiled.h"
|
|
|
|
class RPC;
|
|
|
|
struct TurnstileMigrationItem {
|
|
QString fromAddr;
|
|
QString intTAddr;
|
|
QString destAddr;
|
|
int blockNumber;
|
|
double amount;
|
|
bool chaff;
|
|
};
|
|
|
|
class Turnstile
|
|
{
|
|
public:
|
|
Turnstile(RPC* _rpc);
|
|
~Turnstile();
|
|
|
|
void planMigration(QString zaddr, QString destAddr);
|
|
QList<double> splitAmount(double amount, int parts);
|
|
void fillAmounts(QList<double>& amounts, double amount, int count);
|
|
|
|
void writeMigrationPlan(QList<TurnstileMigrationItem> plan);
|
|
QList<TurnstileMigrationItem> readMigrationPlan();
|
|
|
|
private:
|
|
QList<int> getBlockNumbers(int start, int end, int count);
|
|
QString writeableFile();
|
|
RPC* rpc;
|
|
};
|
|
|
|
#endif
|
|
|