DragonX compatibility: crash fixes, reorg detection, server failover, sync perf
- Fix Rust FFI panics with catch_unwind wrappers and safe CString handling - Handle poisoned mutex/RwLock from prior panics instead of crashing - Add stuck sync detection (10s stall threshold) and chain reorg user prompt - Add "Skip Verification" button to seed phrase wizard - Update payment URIs from hush: to drgx: - Update branding strings throughout UI - Add all 6 lite servers (lite, lite1-5.dragonx.is) with random selection - Add server connectivity probing to skip unreachable servers - Reuse Tokio runtime across block fetch batches to reduce sync overhead - Update Cargo.lock dependencies
This commit is contained in:
@@ -1,36 +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
|
||||
#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