create Datastore for countedNotes over 10000 puposhis, debug for notes in send
This commit is contained in:
36
src/DataStore/NoteCountDataStore.h
Normal file
36
src/DataStore/NoteCountDataStore.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef NOTECOUNTDATASTORE_H
|
||||
#define NOTECOUNTDATASTORE_H
|
||||
|
||||
#include <QString>
|
||||
#include <QMap>
|
||||
|
||||
class NoteCountDataStore {
|
||||
private:
|
||||
static NoteCountDataStore* instance;
|
||||
static bool instanced;
|
||||
QMap<QString, QString> data;
|
||||
int spendableNotesCount;
|
||||
QString addressWithMaxValue;
|
||||
int maxValue; // Hinzugefügt, um den maximalen Wert zu speichern
|
||||
|
||||
NoteCountDataStore() : spendableNotesCount(0), maxValue(0) {} // Initialisiere maxValue
|
||||
|
||||
public:
|
||||
static NoteCountDataStore* getInstance();
|
||||
void clear();
|
||||
void setData(const QString& key, const QString& value);
|
||||
QString getData(const QString& key);
|
||||
QString dump();
|
||||
|
||||
void setSpendableNotesCount(int count);
|
||||
int getSpendableNotesCount() const;
|
||||
void setAddressWithMaxValue(const QString& address, int value);
|
||||
QString getAddressWithMaxValue() const;
|
||||
|
||||
~NoteCountDataStore() {
|
||||
instanced = false;
|
||||
instance = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // NOTECOUNTDATASTORE_H
|
||||
Reference in New Issue
Block a user