mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Remove ::GetVirtualTransactionSize() alias
Each alias is only used in one place.
This commit is contained in:
parent
fa2f6c1a61
commit
fa477d32ee
4 changed files with 2 additions and 21 deletions
|
@ -137,7 +137,7 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
CTransaction ctx = CTransaction(mtx);
|
CTransaction ctx = CTransaction(mtx);
|
||||||
size_t size = GetVirtualTransactionSize(ctx, GetTransactionSigOpCost(ctx, view, STANDARD_SCRIPT_VERIFY_FLAGS));
|
size_t size(GetVirtualTransactionSize(ctx, GetTransactionSigOpCost(ctx, view, STANDARD_SCRIPT_VERIFY_FLAGS), ::nBytesPerSigOp));
|
||||||
result.estimated_vsize = size;
|
result.estimated_vsize = size;
|
||||||
// Estimate fee rate
|
// Estimate fee rate
|
||||||
CFeeRate feerate(fee, size);
|
CFeeRate feerate(fee, size);
|
||||||
|
|
|
@ -6,22 +6,6 @@
|
||||||
#ifndef BITCOIN_POLICY_SETTINGS_H
|
#ifndef BITCOIN_POLICY_SETTINGS_H
|
||||||
#define BITCOIN_POLICY_SETTINGS_H
|
#define BITCOIN_POLICY_SETTINGS_H
|
||||||
|
|
||||||
#include <policy/policy.h>
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
class CTransaction;
|
|
||||||
|
|
||||||
extern unsigned int nBytesPerSigOp;
|
extern unsigned int nBytesPerSigOp;
|
||||||
|
|
||||||
static inline int64_t GetVirtualTransactionSize(int64_t weight, int64_t sigop_cost)
|
|
||||||
{
|
|
||||||
return GetVirtualTransactionSize(weight, sigop_cost, ::nBytesPerSigOp);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int64_t GetVirtualTransactionSize(const CTransaction& tx, int64_t sigop_cost)
|
|
||||||
{
|
|
||||||
return GetVirtualTransactionSize(tx, sigop_cost, ::nBytesPerSigOp);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // BITCOIN_POLICY_SETTINGS_H
|
#endif // BITCOIN_POLICY_SETTINGS_H
|
||||||
|
|
|
@ -87,9 +87,6 @@ FUZZ_TARGET_INIT(integer, initialize_integer)
|
||||||
}
|
}
|
||||||
(void)GetSizeOfCompactSize(u64);
|
(void)GetSizeOfCompactSize(u64);
|
||||||
(void)GetSpecialScriptSize(u32);
|
(void)GetSpecialScriptSize(u32);
|
||||||
if (!MultiplicationOverflow(i64, static_cast<int64_t>(::nBytesPerSigOp)) && !AdditionOverflow(i64 * ::nBytesPerSigOp, static_cast<int64_t>(4))) {
|
|
||||||
(void)GetVirtualTransactionSize(i64, i64);
|
|
||||||
}
|
|
||||||
if (!MultiplicationOverflow(i64, static_cast<int64_t>(u32)) && !AdditionOverflow(i64, static_cast<int64_t>(4)) && !AdditionOverflow(i64 * u32, static_cast<int64_t>(4))) {
|
if (!MultiplicationOverflow(i64, static_cast<int64_t>(u32)) && !AdditionOverflow(i64, static_cast<int64_t>(4)) && !AdditionOverflow(i64 * u32, static_cast<int64_t>(4))) {
|
||||||
(void)GetVirtualTransactionSize(i64, i64, u32);
|
(void)GetVirtualTransactionSize(i64, i64, u32);
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ void CTxMemPoolEntry::UpdateLockPoints(const LockPoints& lp)
|
||||||
|
|
||||||
size_t CTxMemPoolEntry::GetTxSize() const
|
size_t CTxMemPoolEntry::GetTxSize() const
|
||||||
{
|
{
|
||||||
return GetVirtualTransactionSize(nTxWeight, sigOpCost);
|
return GetVirtualTransactionSize(nTxWeight, sigOpCost, ::nBytesPerSigOp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap& cachedDescendants,
|
void CTxMemPool::UpdateForDescendants(txiter updateIt, cacheMap& cachedDescendants,
|
||||||
|
|
Loading…
Add table
Reference in a new issue