From 0733c1bde69c6ccfe593d2eec775d0ae32fe7140 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 11 Nov 2013 16:03:51 +1000 Subject: Refactor: move GetValueIn(tx) to tx.GetValueIn() GetValueIn makes more sense as a CTransaction member. --- src/miner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/miner.cpp') diff --git a/src/miner.cpp b/src/miner.cpp index b01b60cc3..5661037ac 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -261,7 +261,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) // This is a more accurate fee-per-kilobyte than is used by the client code, because the // client code rounds up the size to the nearest 1K. That's good, because it gives an // incentive to create smaller transactions. - double dFeePerKb = double(nTotalIn-GetValueOut(tx)) / (double(nTxSize)/1000.0); + double dFeePerKb = double(nTotalIn-tx.GetValueOut()) / (double(nTxSize)/1000.0); if (porphan) { @@ -318,7 +318,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn) if (!view.HaveInputs(tx)) continue; - int64_t nTxFees = view.GetValueIn(tx)-GetValueOut(tx); + int64_t nTxFees = view.GetValueIn(tx)-tx.GetValueOut(); nTxSigOps += GetP2SHSigOpCount(tx, view); if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS) -- cgit v1.2.3