Skip to content

Wallet coinselection #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a49a68f
mtx: move out coinselector.
nodech Apr 15, 2025
cd3399b
test: add more coin selection tests to mtx and coinselection.
nodech Apr 24, 2025
d6eafc4
wallet: add by value indexes for credits.
nodech Apr 29, 2025
3c94eb3
wallet: add by value indexes for credits.
nodech May 1, 2025
b8ce31e
wallet: add by height indexes for credits.
nodech May 1, 2025
48b377e
txdb-indexes: don't index non spendable coins.
nodech May 2, 2025
0cc7d78
mtx: separate fund and fill.
nodech May 5, 2025
6819a19
txdb-indexes: Introduce separate indexes for confirmed/unconfirmed va…
nodech May 6, 2025
dfbef04
txdb: Add wallet wide height indexes for by value coinselection.
nodech May 6, 2025
2b0f111
wallet: address nits.
nodech May 7, 2025
f9f2539
test: add heights to the coinselection test.
nodech May 7, 2025
ec08bb4
test: add wallet coin selection by value tests.
nodech May 13, 2025
ed380ca
test: add smart option tests to wallet coin selector.
nodech May 14, 2025
3881e32
test: add age tests to the wallet coin selection.
nodech May 14, 2025
98eaa5f
test: add all selection tests to the wallet coin selection.
nodech May 14, 2025
40a083a
test: add existing input tests to the wallet coin selection.
nodech May 15, 2025
bbb4408
coinselection: select all even with existing coins/inputs.
nodech May 16, 2025
1121e8e
wallet: add wallet coin source.
nodech May 20, 2025
dded017
wallet-coinselector: skip non-existent coins.
nodech May 21, 2025
37b11e5
test: move wallet utils and add createAddress option.
nodech May 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/coins/coinview.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ class CoinView extends View {

/**
* Spend an output.
* @param {Outpoint} prevout
* @param {Outpoint|Coin} prevout
* @returns {CoinEntry|null}
*/

Expand All @@ -216,7 +216,7 @@ class CoinView extends View {

/**
* Remove an output.
* @param {Outpoint} prevout
* @param {Outpoint|Coin} prevout
* @returns {CoinEntry|null}
*/

Expand All @@ -232,7 +232,7 @@ class CoinView extends View {

/**
* Test whether the view has an entry by prevout.
* @param {Outpoint} prevout
* @param {Outpoint|Coin} prevout
* @returns {Boolean}
*/

Expand All @@ -248,7 +248,7 @@ class CoinView extends View {

/**
* Get a single entry by prevout.
* @param {Outpoint} prevout
* @param {Outpoint|Coin} prevout
* @returns {CoinEntry|null}
*/

Expand Down
6 changes: 3 additions & 3 deletions lib/primitives/covenant.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,17 @@ class Covenant extends bio.Struct {
/**
* Set covenant to BID.
* @param {Hash} nameHash
* @param {Number} start
* @param {Number} height
* @param {Buffer} rawName
* @param {Hash} blind
* @returns {Covenant}
*/

setBid(nameHash, start, rawName, blind) {
setBid(nameHash, height, rawName, blind) {
this.type = types.BID;
this.items = [];
this.pushHash(nameHash);
this.pushU32(start);
this.pushU32(height);
this.push(rawName);
this.pushHash(blind);

Expand Down
Loading