This was a difficult merge as always with diffs that touch spend.cpp and
createtransactioninternal. Added a FIXME NB for fundrawtransaction with
external outputs, which MUST be fixed before a new release.
ReserveDestination::SetBlindingPubKey was removed since it was only used
in one place (in Wallet::GetNewChangeDestination), and after this change
it was silently breaking blinded change addresses by somehow replacing
the destination with CNoDestination...
This should be reviewed carefully. The new availablecoins_test was
showing an intermittent error [1]. The test variants were split out into
their own test cases to work around the issue, but requires further
investigation.
[1]: https://github.com/ElementsProject/elements/issues/1370
Please reviewthis commit *extremely thoroughly*.
This commit changed how certain transaction size calculations are done.
This altered fee estiimation for certain elements transactions, and caused a lot
of things to break in the `wallet_bumpfee` functional test.
After *extensive* work (~10 hours), I managed to figure all this out and properly
reconcile the functional test to work with the new fee calculations.
However, the original bitcoin commit didn't have any changes to this functional test.
So, it's also simply possible that I may have made an actual bug and these fee issues
I was seeing in the functional test were pointing at this bug.
I'm not sure if there is a bug. I don't think so... I think the transaction estimations just got
bigger in certain cases.
But... please verify this. Look into the diff of this commit, and compare how use_max_sig used
to be calculated in a bunch of different ways for different use cases, but is now being calculated
only once (inside of DummySignInput), in the same way for all use cases. Did I accidentally introduce
a bug there?
In other words... I'm not certain about the wallet changes here. Please double and triple check them.
Thanks!
I commented out a new assertion on transaction size in test/functional/rpc_fundrawtransaction.py.
That calculation needs to be updated to work properly for elements.
This was a tricky merge (wallet refactor). Please double check my
changes to CreateTransactionInternal(...) in src/wallet/spend.cpp, and to
SendGenerationTransaction(...) in src/wallet/rpc/elements.cpp.
Lastly, I got all the tests passing, but I'm not certain that the changes
with fixed_change_pos in CreateTransactionInternal were correct.