This upstream refactor stopped passing in the pool by pointer and
now wraps it in a shared_ptr.
A lot less 'address-of' operators and generally cleaner code are
the result.
In addition:
- Made it work with latest commit to Flowee/thehub/#5.
- Works better now when decrypting the wallet (accountInfo.isElectrum property
should not be CONSTANT but instead notify on change)
- Made the actual wallet seed phrase type get saved to the wallet rather
than a bool. This type comes from enum HDMasterKey::MnemonicType in
thehub libs.
This is the format used by (older) Electron Cash wallets. It may be
useful to users wishing to use their older EC wallets with Flowee Pay.
Highlight of changes:
- Import wallet UI now auto-detects whether it's Electrum or BIP39. Note
that in some cases a valid BIP39 seed is also a valid Electrum seed.
The user has a UI element checkbox for "forcing" Electrum
interpretation in such cases.
- Electrum seed phrases always use derivation path "m/" so this is
forced on the user as the only path available in the Electrum case.
- Wallet file format has a new tag to indicate whether the seed phrase
is electrum or not. Only present in the electrum case, otherwise it's
omitted from the serialized data.
The backend will tell us that there is good reason to believe the remote
needs to get a new bloom filter, which is causing a lot of extra traffic
if there actually is no change in the utxo of the wallet.
This introduces a bool to mark changes that would affect the bloom
filter to be send, and only upload a new one when that bool is true.
We introduce a new WalletkeyView which is a class that provides a
thread-safe view on a single private-key in the wallet. Detecting all
transactions depositing money in that key and thus being an ideal
backend for the PaymentRequest.
This mostly removes the less than successful architecture.
This architecture stems from my first attempts at mixing C++ and QML, and
its not great.
As we can see from the removals, it touches a lot of places and
especially the wallet owning them is messy, but in QML we have to do a
lot of null pointer checks, also not exactly readable.
Lets try something different.
Fixes: #14
During import we now always send all change addresses to be monitored
for activity, even if they are empty.
The behavior of not reusing an address after its been emptied is not
universal and as such the import should account for this.
The privacy issue is really not harmed by this during import, as we
basically send all the addresses in a relatively short timespan to the
peer anyway.
Don't do any work when the transactions that are being added are all
already known.
This is common when we send a merkleblock request to some peer after we
already have received the answer before. For instance when we double
check nothing is being omitted by some other peer.
Now the wallet handles inserts-in-place by making removing and then
re-adding of transactions, the 'txIndex' is no longer guarenteed to live
forever.
So we now tell the world, and specifically the history model, about the
removal of txIIndexes.
One notable behavior change is that we increase the 'change' gap
considerably for wallets that are known to have 'cashfusion'
transactions as those use a lot of change addresses.
This chang also increases the normal gap to avoid people losing history
when importing from another wallet.
In our wallet we very rarely end up in a situation where we have to ask
the same transactions twice from a peer due to us having generated a
bunch of new keys from a HD wallet in the middle of a series we asked
that peer. Making the filter we sent at the start of the series be
outdated halfway through.
This is now handled properly.
This adds a unit test which tests that we now reach the right balance
and can add the same block multiple times without it failing.
Fixes: #12
Instead of recalculating every single block, we now use the existing
locking of UTXOs feature to lock coinbase outputs to a certain
maturation height.
This is the traditional trade-off where we store some more data to
avoid work in the common codepath.
We now show the estimated tip until the headers chain has been synched.
This follows p2pnet listener interfaces changes.
This uses the nicer interfaces setup to make available for FloweePay
the signal that we have reached the tip of the headerChain
Slowly the amount of cpp sources has been growing to the point
where its just too much to store in the root of the project.
I think they are more happy in a subdir as well, getting an elevated
position for themselves.