mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
Replace CTxInUndo with Coin
The earlier CTxInUndo class now holds the same information as the Coin class. Instead of duplicating functionality, replace CTxInUndo with a serialization adapter for Coin.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
int ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out);
|
||||
int ApplyTxInUndo(const Coin& undo, CCoinsViewCache& view, const COutPoint& out);
|
||||
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, CTxUndo &txundo, int nHeight);
|
||||
|
||||
namespace
|
||||
@@ -371,7 +371,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
|
||||
// restore inputs
|
||||
if (!tx.IsCoinBase()) {
|
||||
const COutPoint &out = tx.vin[0].prevout;
|
||||
const CTxInUndo &undoin = undo.vprevout[0];
|
||||
const Coin &undoin = undo.vprevout[0];
|
||||
ApplyTxInUndo(undoin, *(stack.back()), out);
|
||||
}
|
||||
// Store as a candidate for reconnection
|
||||
|
||||
Reference in New Issue
Block a user