diff --git a/.gitconfig b/.gitconfig index b520074..07f00e5 100644 --- a/.gitconfig +++ b/.gitconfig @@ -7,7 +7,7 @@ ignoreWhitespace = no [alias] lg = log --max-count=6 --pretty=format:'%C(auto)%h %d %Creset %p %C("#60A0FF")%cr %Cgreen %cn %G? %GT trust%Creset%n %<(78,trunc)%s%n' - graph = log --max-count=38 --graph --pretty=format:'%C(auto)%h %<(78,trunc)%s %Cgreen(%cr) %C(bold blue)%cn %G?%Creset' --abbrev-commit + graph = log --graph --pretty=format:'%C(auto)%h %<(78,trunc)%s %Cgreen(%cr) %C(bold blue)%cn %G?%Creset' --abbrev-commit alias = !git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ / | grep -v ^'alias ' | sort utcmt = !git commit --date=\"$(date --utc +%Y-%m-%dT%H:%M:%Sz)\" [commit] diff --git a/msvc/wallet.vcxproj b/msvc/wallet.vcxproj index 99865da..41f374e 100644 --- a/msvc/wallet.vcxproj +++ b/msvc/wallet.vcxproj @@ -144,8 +144,8 @@ - - + + diff --git a/sqlite3/sqlite3.c b/sqlite3/sqlite3.c index 1f2cb24..5154108 100644 --- a/sqlite3/sqlite3.c +++ b/sqlite3/sqlite3.c @@ -28,7 +28,7 @@ #define SQLITE_THREADSAFE 2 //Sets the default mode to SQLITE_CONFIG_MULTITHREAD. One thread, one database connection. Data structures such as compiled SQL are threadlocal. But sqlite3 is empowered to do its own multithreading. Many databases per database connection. Database connection and compiled sql statements are threadlocal. last_insert_rowid() is not subject to race conditions in this mode. #define SQLITE_DEFAULT_MEMSTATUS 0 //Don't track memory usage. Disables the ability of the program using sqlite3 to monitor its memory usage. This setting causes the sqlite3_status() interfaces that track memory usage to be disabled. This helps the sqlite3_malloc() routines run much faster, and since SQLite uses sqlite3_malloc() internally, this helps to make the entire library faster. #define SQLITE_DEFAULT_WAL_SYNCHRONOUS 1 // in WAL mode, recent changes to the database might be rolled back by a power loss, but the database will not be corrupted. Furthermore, transaction commit is much faster in WAL mode using synchronous=NORMAL than with the default synchronous=FULL. For these reasons, it is recommended that the synchronous setting be changed from FULL to NORMAL when switching to WAL mode. This compile-time option will accomplish that. -#define SQLITE_DEFAULT_FOREIGN_KEYS 1 // Enforce foreign key constraints. +#define SQLITE_DEFAULT_FOREIGN_KEYS 0 //Dont handle foreign key constraints. Programmer has to do it himself. #define SQLITE_LIKE_DOESNT_MATCH_BLOBS 1 //Blobs are not strings. Historically, SQLite has allowed BLOB operands to the LIKE and GLOB operators. But having a BLOB as an operand of LIKE or GLOB complicates and slows the LIKE optimization. When this option is set, it means that the LIKE and GLOB operators always return FALSE if either operand is a BLOB. That simplifies the implementation of the LIKE optimization and allows queries that use the LIKE optimization to run faster. #define SQLITE_MAX_EXPR_DEPTH 0 //Setting the maximum expression parse-tree depth to zero disables all checking of the expression parse-tree depth, which simplifies the code resulting in faster execution, and helps the parse tree to use less memory. #define SQLITE_OMIT_DECLTYPE 1 // By omitting the (seldom-needed) ability to return the declared type of columns from the result set of query, prepared statements can be made to consume less memory. diff --git a/src/frame.cpp b/src/frame.cpp index 0847167..1696e64 100644 --- a/src/frame.cpp +++ b/src/frame.cpp @@ -249,6 +249,11 @@ void Frame::NewWallet(wxFileName& filename, ristretto255::hash<256>& secret) { PRAGMA journal_mode = WAL; PRAGMA synchronous = 1; BEGIN IMMEDIATE TRANSACTION; +CREATE TABLE "Keys"( + "ROWID" INTEGER PRIMARY KEY, + "pubkey" BLOB NOT NULL UNIQUE, + "id" integer NOT NULL, + "use" INTEGER NOT NULL) STRICT; CREATE UNIQUE INDEX i_pubkey ON Keys (pubkey); CREATE UNIQUE INDEX i_id ON Keys (use, id); @@ -264,16 +269,8 @@ CREATE TABLE "Misc"( "ROWID" INTEGER PRIMARY KEY, "m" ANY ) STRICT; - -CREATE TABLE "Keys"( - "ROWID" INTEGER PRIMARY KEY, - "pubkey" BLOB NOT NULL UNIQUE, - "id" integer NOT NULL, - "use" INTEGER NOT NULL, - FOREIGN KEY(id) REFERENCES Names(ROWID) -) STRICT; - COMMIT;)|"); + wxLogMessage("\t\tConstructing default wallet %s", filename.GetFullPath()); // We now have a working wallet file with no valid data. Attempting to create a strong random secret, a name, and public and private keys for that name. wxLogMessage("\t\tGenerating random 128 bit wallet secret"); auto text_secret{ DeriveTextSecret(ristretto255::scalar::random(), 1) }; diff --git a/wxWidgets b/wxWidgets index 78cd5a0..c2980fa 160000 --- a/wxWidgets +++ b/wxWidgets @@ -1 +1 @@ -Subproject commit 78cd5a04e6b87a0d3643ba03c8f28ccc1ce2f051 +Subproject commit c2980fa75c41eac5152898fc41709832ccb24759