Skip to content

Commit a00eb38

Browse files
committed
Allow CInputCoin to also be constructed with COutPoint and CTxOut
1 parent 419afa9 commit a00eb38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/wallet/coinselection.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ class CInputCoin {
3737
m_input_bytes = input_bytes;
3838
}
3939

40+
CInputCoin(const COutPoint& outpoint_in, const CTxOut& txout_in)
41+
{
42+
outpoint = outpoint_in;
43+
txout = txout_in;
44+
effective_value = txout.nValue;
45+
}
46+
47+
CInputCoin(const COutPoint& outpoint_in, const CTxOut& txout_in, int input_bytes) : CInputCoin(outpoint_in, txout_in)
48+
{
49+
m_input_bytes = input_bytes;
50+
}
51+
4052
COutPoint outpoint;
4153
CTxOut txout;
4254
CAmount effective_value;

0 commit comments

Comments
 (0)