mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 21:52:53 +02:00
Merge bitcoin/bitcoin#35372: refactor: Enhance type safety in overflow operations
0774eaaf0cutil: Require integers for SaturatingAdd() and AdditionOverflow() (Hodlinator)a815e3e262rpc: Correct type for tx_sigops (Hodlinator) Pull request description: * Correct copy-paste error in RPC code * Require proper integers for `SaturatingAdd()` and `AdditionOverflow()` in src/util/overflow.h These changes increase the type safety of the code and were done while exploring increasing the type-safety of `CAmount` (currently just a `typedef` of `int64_t`). The first commit has nothing to do with overflow but is along for the ride if reviewers agree. ACKs for top commit: maflcko: lgtm ACK0774eaaf0cwinterrdog: ACK0774eaaf0csedited: ACK0774eaaf0cTree-SHA512: a245ad52cfd1c257151aea1a1ed4b6769415c1dddc7c405d8bbe71b9f3abc512a6d890a45cbc8381718be16274e337cc876e6e6da11dc35de71bea83bece6634
This commit is contained in:
@@ -927,7 +927,7 @@ static RPCMethod getblocktemplate()
|
||||
UniValue transactions(UniValue::VARR);
|
||||
std::map<Txid, int64_t> setTxIndex;
|
||||
std::vector<CAmount> tx_fees{block_template->getTxFees()};
|
||||
std::vector<CAmount> tx_sigops{block_template->getTxSigops()};
|
||||
std::vector<int64_t> tx_sigops{block_template->getTxSigops()};
|
||||
|
||||
int i = 0;
|
||||
for (const auto& it : block.vtx) {
|
||||
|
||||
Reference in New Issue
Block a user