Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 7: [PATCH 07/68] build: adapt Roots maintenance and assurance to Core 30.3

src/kernel/mempool_entry.h

Before: src/kernel/mempool_entry.h · After: src/kernel/mempool_entry.h

File metadata
index ee0f360e3c183e5e58e9b143d7bcf25434f1aa00..724afe5be26d7bbdc760633813ae610314ff6ac2 100644

Download original patch · Release notes

Diff rows 1–17 of 17. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.

src/kernel/mempool_entry.h CHANGED
@@ -152,8 +152,7 @@ public:
152
  nSizeWithAncestors{GetTxSize()},
153
  nModFeesWithAncestors{nFee},
154
  nSigOpCostWithAncestors{sigOpCost} {
155
- CAmount nValueIn = tx->GetValueOut() + nFee;
156
- assert(inChainInputValue <= nValueIn);
157
  }
158
 
159
  CTxMemPoolEntry(const CTransactionRef& tx, CAmount fee,
@@ -191,7 +190,7 @@ public:
191
  const CAmount& GetFee() const { return nFee; }
192
  int32_t GetTxSize() const
193
  {
194
- return GetVirtualTransactionSize(nTxWeight + m_extra_weight, sigOpCost, ::nBytesPerSigOp);
195
  }
196
  int32_t GetTxWeight() const { return nTxWeight; }
197
  std::chrono::seconds GetTime() const { return std::chrono::seconds{nTime}; }
 
152
  nSizeWithAncestors{GetTxSize()},
153
  nModFeesWithAncestors{nFee},
154
  nSigOpCostWithAncestors{sigOpCost} {
155
+ assert(inChainInputValue == 0 || inChainInputValue <= tx->GetValueOut() + nFee);
 
156
  }
157
 
158
  CTxMemPoolEntry(const CTransactionRef& tx, CAmount fee,
 
190
  const CAmount& GetFee() const { return nFee; }
191
  int32_t GetTxSize() const
192
  {
193
+ return GetVirtualTransactionSize(int64_t{nTxWeight} + m_extra_weight, sigOpCost, ::nBytesPerSigOp);
194
  }
195
  int32_t GetTxWeight() const { return nTxWeight; }
196
  std::chrono::seconds GetTime() const { return std::chrono::seconds{nTime}; }