Commit Graph

65 Commits

Author SHA1 Message Date
Cheng
36343e69ba
testing functionality of extended keys in unit_test.cpp 2024-08-04 13:07:38 +08:00
Cheng
ba84172bbd
wiped scalars on destruction, and added extended public keys to unit_test.cpp 2024-08-02 13:36:07 +08:00
Cheng
133b7d27c8
moved extended_extended_private_key unit test from testbed to unit test 2024-08-01 11:02:00 +08:00
Cheng
deac6e35d1
base 58 representation of extended keys works 2024-07-31 21:43:52 +08:00
Cheng
8792d59c67
removed requirement for a blob field from base58 2024-07-30 16:01:39 +08:00
Cheng
acf980a5a1
src/db_accessors.cpp made it utf-8 bom
src/unit_test.cpp typo in error message
2024-07-29 16:37:49 +08:00
Cheng
feb040d800
added extended keys
but not going to start using them until
I can save them to the database and reload them
2024-07-27 15:32:03 +08:00
Cheng
21cc95e246
building wxWidgets as a cmake project file instead of visual studio project file 2024-02-22 22:44:31 +10:00
Cheng
e14148d4f5
updated to 3.2.4 2024-02-19 22:10:39 +10:00
Cheng
fac065506c
moved utcmt to its proper directory 2024-02-14 21:48:06 +10:00
Cheng
bb547abae4
oops, no message, need to review what I have done 2024-02-14 21:16:32 +10:00
Cheng
ade9263aa4
minor changes in sqlite compile time options.
Again, wasting time on a digression
2023-11-14 05:29:02 +10:00
Cheng
236e59badf
added error logging capability for sqlite3,
which is an irrelevant digression, since it already
reports errors on calls

Maybe I will get reports if I fail to finalize a compiled
sql statement before shutting down a database connection,
but the most likely circumstance for this to happen is
on program close, when I am unlikely to be able to see
the log.
2023-11-13 15:54:53 +10:00
Cheng
3e480213cc
Massive bug, in that a long time ago I made changes to sqlite.h
but not to the corresponding copy of sqlite.h
Fixed case that there are no yet any names in
the database - it now automatically nags you.
2023-11-13 10:41:39 +10:00
Cheng
224ab60395
layout bug due to failure to call layout.
Sqlite3 crash due to premature call to shutdown.

calls to layout very rarely have any obvious effect,
but sometimes under odd and idiosyncratic circumstances
they do.

Called shutdown after the destroy was executed, but destroy does
not immediately destroy the windows, thus does not immediately
finalize all compiled sql statements and close all database
connections. You have to wait for all the windows to be destroyed.
Again, a rare crash except under certain special circumstances.
2023-11-12 19:43:19 +10:00
Cheng
c65f2fbf6e
Cleaned up the add name on the dry prinicple
fixed bug in the position of the inserted
name that happened with names identical
except for capitalization.
2023-11-12 14:53:23 +10:00
Cheng
55d0d69c8f
removed redundant std_uniques, and fixed
add name so it does not flash so horribly

Massively violating dry - I need to extract the repeated
code into a struct that does the cleanup when it is
destroyed
2023-11-12 13:56:48 +10:00
Cheng
ffa392b922
removed a the redundantly explicit std::uniques
from display_wallet.h and display_wallet.cpp

They are now all wrapped in the long promised
and long forgotten wrapper class.

Long, long ago, I intended to implement the Pimpl idiom,
but these days std::unique takes care of all that work for
you.  You just wrap your low level pimple class in a high
level wrapper whose base class is an std_unique_ptr to
to an instance of your low level class.
2023-11-12 08:28:00 +10:00
Cheng
f819b98d9e
window refreshed on add username
but the overhead and screen flash
of destroying and recreating every
little window is annoying.

I should use something like:
SELECT COUNT(*) FROM UserZookoIDs
WHERE LOWER("name")<LOWER(?1) AND "name"<?1);
and insert a new item at that position
2023-11-11 12:10:37 +10:00
Cheng
35a3be9aa7
Made a start on amending the code to take advantage of
the sqlite view capability VIEW UserZookoIDs

Made add_name responsive, but add_name still
does not use the VIEW triggers.

Got distracted by sizing issues.  There is some issues
with resizing architecture - I know they put an ad hoc
workaround in on dialogs, need to read up on what they
did and why.
2023-11-10 22:00:16 +10:00
Cheng
cfa234ef09
Amended the dynamic menu handling
for the case where we have many windows and
you want to change the menu on change of focus

Which is a classic example of writing code before
it is needed.
2023-11-08 17:23:12 +10:00
Cheng
3d805aa7c5
Fixed wallet to use the default wallet location
if available, rather than asking for a location
2023-10-29 15:37:33 +10:00
Cheng
1d7ce60cf7
Fixed the default directory to be
standardpath /vendor name/appname
2023-10-20 12:51:51 +10:00
Cheng
d59729f396
Never really figured out why my code was breaking
fixed it by looking for funny things that deviated from
the sameples,  and doing various recommended safe things,
and found a few sql errors, and one by one the crashes
went away.

The new wxWidgets just seems less tolerant of little careless
stuff that is not right.
2023-10-18 20:23:56 +10:00
Cheng
0f214cb028
broken file dialog, broken save default file
looks like wxWidgets bugs
going back to sample code
either sample code breaks, and I make a bug report
to wxWidgets, or I converge the sample code to my
code, and see when it breaks
2023-10-05 20:31:45 +10:00
Cheng
145a3a911f
Finally documented the api to my hash code.
Also fixed it so that
hash<...> a = hsh() << ...;
Actually works.  Needed a cast in the hsh class that calls
the constructor in the hash class.
2023-10-03 11:34:30 +10:00
Cheng
7ba674c29a
Cajoled visual studio into issuing intelligent error messages
when an unserializable type is in the parameter pack.
2023-10-02 11:49:04 +10:00
Cheng
dbe030ba21
Went all in on concepts because of nicer error messages
But did not apply the concept to the parameter pack,
event though I applied no end of cleverness to generate
a variant concept, because
visual studio gives meaningless error messages when applying
a variant concept to a parameter pack.

This will probably improve in later or different compilers,
but right now, this feature does not work
2023-10-01 06:11:15 +10:00
Cheng
bc3f2c9daf
Removed the old "is_serializable" in favor of C++20 concepts syntax.
Changed the name to "has_machine_independent_representation" for a more
intellible error explanation
2023-09-30 15:13:26 +10:00
Cheng
5f4fe3104b
Moved the compiled sql statments from the stack to unique
pointers that are members of the window
2023-09-29 21:16:13 +10:00
Cheng
883d8c5b51
Found the sanity test bug.
My hashing code incorrectly ignored the trailing null in std::strings.
(but not in c strings)
2023-09-29 18:44:49 +10:00
Cheng
bba593180e
displays names in alphabetic order
sanity test of pubkey mysteriously fails in display_wallet, yet identical test with same values succeeds in unit_test
need to create a view once sanity test passes.
then need to refresh display on edit/add name
need to make a second try at integrating release v3.2.2.1
2023-09-29 08:14:29 +10:00
Cheng
d82d5218bc
Got it working, the mystery crash was my update to wxWidgets 3.2.2.1 2023-09-28 18:14:32 +10:00
Cheng
b60c57c2d2
rolling back wx widgets to v3.2.0
file dialog now works, but bugs in my sql code
2023-09-28 12:13:08 +10:00
Cheng
b16ddb2071
stashing changes here, and going back in time till file dialogs work 2023-09-27 22:50:55 +10:00
Cheng
f7876905e3
Simplifying the serialization to and from VLQ integer format with C++20 concepts.
Moving serialization to a new header, serialization.h
2023-09-25 18:51:12 +10:00
Cheng
8e7225440a
my exception code was too clever by half 2023-09-25 11:35:18 +10:00
Cheng
fefb99bb33
Discovered that modifying the wxWidgets manifest has no effect
Restored the wallet manifest.
Discovered that local wxString variables are apt to get wiped during
a throw.  Dangerous to pass a wXstring.utf8() to an exception
2023-09-25 10:23:11 +10:00
Cheng
883bd8ebe8
std::format seems like a great idea.
Used it in one place.  Better than printf
derived functionality.

But they never bothered to think through supporting user types,
and that is a complete mess that is grossly inconsistent or simply
not working from one compiler to the next.
2023-09-24 20:06:54 +10:00
Cheng
fc9f82b6e5
Documented a bit of code that I had started to forget.
Remade hashing according to the dry principle,
eliminating much code repetition.
Introduced c++20 "concepts" to radically reduce
verbose and incomprehensible template metacode.

modified:   src/db_accessors.h
modified:   src/ristretto255.h
modified:   src/testbed.cpp
2023-09-24 15:38:10 +10:00
Cheng
89ebcee054
fixed those irritating uninitialized memory warnings by annotating parameters 2023-09-23 15:58:56 +10:00
Cheng
1b0d5148e8
putting in additional SFINAE guards in an effort to hunt down pesky and mysterious warnings 2023-09-22 20:35:28 +10:00
Cheng
9a12dbbd7e
minimally broken branch to isolate what is broken 2023-09-22 19:49:30 +10:00
Cheng
d7c06c75c0
cleaning up error reporting 2023-09-22 12:10:52 +10:00
Cheng
ac7f6806eb
I suffered greatly trying to get the libraries to build correctly
Because one has to separately specify build characteristics in
many different places it is quite difficult to make sure the right
things are linking the right things.

I added the two files msvc/winConfigDebug.bat msvc/winConfigRelease.bat
To build only the libaries that should be linked, so we will get an
error message if a release build links to a debug build.
2023-09-18 07:10:41 +10:00
Cheng
70100fbc61
updating wxWidgets - more carefully this time 2023-09-17 14:52:43 +10:00
Cheng
3dbd15d27e
Added line numbers and function names to unit test failures
Turned off the deprecated compare warning with explanation
Made a small start on getting names in correct order in the display_wallet
Unit test and create new wallet is still broken if wallet file does
not already exist
2023-09-16 18:49:43 +10:00
Cheng
23e95c16ba
moved a large array from stack to dynamic allocation, and fixed unit
test to correctly handle the new database schema
2023-09-15 19:46:38 +10:00
Cheng
408942a336
My update of wxWidgets broke. wxWidgets bug, or bug in the way I use it.
My update of the schema to explicitly name the ROWID column broke everything because I was using position rather than names for fields
2023-09-14 10:45:12 +10:00
Cheng
529cc368c9
avoiding the implicit creation of the oid primary key to avoid sqlite backwards bug compatible quirks 2023-08-03 01:44:08 -07:00