Skip to content

Implement estimateTransactionFee - #13

Open
Keeqler wants to merge 3 commits into
vtnerd:mainfrom
MAGICGrants:estimate-fee
Open

Implement estimateTransactionFee#13
Keeqler wants to merge 3 commits into
vtnerd:mainfrom
MAGICGrants:estimate-fee

Conversation

@Keeqler

@Keeqler Keeqler commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/wallet.cpp
std::sort(unspent_amounts.begin(), unspent_amounts.end(), std::greater<std::uint64_t>());
std::uint64_t selected = 0;
std::size_t n_inputs = 0;
for (const std::uint64_t amt : unspent_amounts)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What to do if there isn't enough unspent coins for the tx? This interface doesn't allow for much - either an exception, a bogus small value for fee, or some bogus large value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lmk if it looks ok now

Comment thread src/wallet.cpp
}
}

if (!unspent_amounts.empty() && !covered)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why !unspend_amounts.empty() ? Seems like the only condition should be !covered ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants