mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-23 05:09:26 +02:00
wallet: Set preset input sequence through coin control
This commit is contained in:
@@ -72,6 +72,12 @@ std::optional<int64_t> CCoinControl::GetInputWeight(const COutPoint& outpoint) c
|
||||
return it != m_selected.end() ? it->second.GetInputWeight() : std::nullopt;
|
||||
}
|
||||
|
||||
std::optional<uint32_t> CCoinControl::GetSequence(const COutPoint& outpoint) const
|
||||
{
|
||||
const auto it = m_selected.find(outpoint);
|
||||
return it != m_selected.end() ? it->second.GetSequence() : std::nullopt;
|
||||
}
|
||||
|
||||
void PreselectedInput::SetTxOut(const CTxOut& txout)
|
||||
{
|
||||
m_txout = txout;
|
||||
@@ -97,4 +103,14 @@ std::optional<int64_t> PreselectedInput::GetInputWeight() const
|
||||
{
|
||||
return m_weight;
|
||||
}
|
||||
|
||||
void PreselectedInput::SetSequence(uint32_t sequence)
|
||||
{
|
||||
m_sequence = sequence;
|
||||
}
|
||||
|
||||
std::optional<uint32_t> PreselectedInput::GetSequence() const
|
||||
{
|
||||
return m_sequence;
|
||||
}
|
||||
} // namespace wallet
|
||||
|
||||
Reference in New Issue
Block a user