Improving asyncOp_sendmany redundancies (first round)
Work over async sendmany operation flow. Specifically on the utxo finding, utxo selection, total amount calculation and the tx inputs appending process. Removed several unneeded for loops over the entire utxo set, re structuring and cleaning the flow.
Release v4.1.1
Optimize release build
----------------------
The release build now sets CLAGS/CXXFLAGS to use the -O3 optimization
option, which turns on more optimization flags than the previously used
-O1. This produces a faster build, addressing a performance regression in
v4.1.0.
Correctly report Founders' Reward amount in `getblocktemplate`
--------------------------------------------------------------
This release correctly returns the `foundersreward` field from `getblocktemplate`
output pre-Canopy and removes the field post-Canopy. (The Founders' Reward will
expire exactly as Canopy activates, as specified in [ZIP 207](https://zips.z.cash/zip-0207).)
To obtain information about funding stream amounts, use `getblocksubsidy HEIGHT`,
passing in the height returned by the `getblocktemplate` API.
Correctly report founder's reward amount in getblocktemplate prior to Canopy
Previously this would return incorrect results in the case that the
miner reward was sent to a shielded address. Post-Canopy, the
foundersreward field is removed; this information should be obtained
from getblocksubsidy instead.
Previously this would return incorrect results in the case that the
miner reward was sent to a shielded address. Post-Canopy, the
foundersreward field is removed; this information should be obtained
from getblocksubsidy instead.
What the commits is essentially doing is:
1) Decouple transparent inputs load into its own method (making use of the recently added TxValues helper).
2) Move load transactions inputs right after get the available coins from the wallet inside find_utxos.
3) Remove the redundant loop over the available utxo to calculate the _inputs_total value that occurs after calling find_utxos (_inputs_total is being calculated inside the inputs selection loop only once now, inside load_utxos).
GetNextWorkRequired: clarify why this computation is equivalent to that in the protocol spec
refs https://github.com/zcash/zips/pull/418 cc: @teor2345
Comment-only change; no documentation or testing required.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Don't compile ehHashState::* if mining is disabled
Compile currently fails if using `CONFIGURE_FLAGS=--disable-mining`, because the `ehHashState::*` functions inadvertently get included.
These are external libraries, and it does not make sense to maintain an
otherwise-meaningless diff from upstream.
This partially reverts commit 1e6d1837a0.