• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Chia-Network / chia-blockchain / 23662694873
91%

Build:
DEFAULT BRANCH: main
Ran 27 Mar 2026 08:35PM UTC
Jobs 1
Files 902
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Mar 2026 06:58PM UTC coverage: 91.163% (-0.08%) from 91.246%
23662694873

push

github

web-flow
Fix combine_coins ignoring --max-coin-amount and including spent coins (#20717)

* Fix combine_coins ignoring max_coin_amount and including spent coins

The `combine_coins` method in `wallet_state_manager.py` had two bugs in
its `get_coin_records()` calls:

1. The `--max-coin-amount` / `-l` CLI flag was silently ignored when
   `--target-amount` was not provided. The fill-up query at line ~3026
   did not pass `amount_range`, so `coin_selection_config` limits had
   no effect.

2. Neither `get_coin_records()` call passed `spent_range`, so both
   returned spent coins alongside unspent ones. This caused combine to
   build invalid transactions referencing already-spent coins, which
   could never confirm and left the wallet stuck at 0 spendable.

Fix: add `spent_range=UInt32Range(stop=uint32(0))` to both call sites
and `amount_range` (from `coin_selection_config`) to the fill-up query.
This matches the pattern already used by `auto_claim_coins()`.

* Add test for combine_coins spent-coin rejection and fill-up filtering

Addresses review feedback: the new ValueError for already-spent
target_coin_ids had no test coverage, and the spent_range filter on the
fill-up get_coin_records query was not exercised with spent records
present.

test_combine_coins_rejects_spent_coins covers both paths:
1. Explicitly specifying a spent coin ID raises ValueError.
2. A fill-up combine (no explicit IDs, smallest-first) with spent
   records in the DB correctly skips them and selects only unspent coins.

10449 of 11633 branches covered (89.82%)

Branch coverage included in aggregate %.

46 of 46 new or added lines in 2 files covered. (100.0%)

109 existing lines in 26 files now uncovered.

106098 of 116212 relevant lines covered (91.3%)

1.83 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
85.42
-0.34% chia/cmds/plotnft_funcs.py
1
96.88
-0.28% chia/full_node/block_store.py
1
81.9
-0.86% chia/introducer/introducer.py
1
94.52
-0.68% chia/server/chia_policy.py
1
99.82
-0.06% chia/_tests/core/mempool/test_mempool_manager.py
1
99.42
-0.58% chia/_tests/rpc/test_rpc_server.py
1
93.02
-0.78% chia/timelord/timelord_api.py
1
94.48
-0.03% chia/wallet/wallet_state_manager.py
1
98.18
-1.82% chia/wallet/wallet_user_store.py
2
95.52
-0.18% chia/data_layer/data_store.py
2
98.57
-0.57% chia/full_node/coin_store.py
2
96.58
-1.03% chia/util/db_wrapper.py
2
98.23
-0.71% chia/util/file_keyring.py
2
81.82
-13.64% chia/util/json_util.py
3
86.89
-0.21% chia/full_node/full_node_api.py
4
90.94
-1.25% chia/rpc/rpc_server.py
4
81.94
0.17% chia/server/node_discovery.py
5
85.66
-0.61% chia/data_layer/data_layer.py
5
87.45
-0.13% chia/full_node/full_node.py
5
81.48
-12.96% chia/introducer/introducer_api.py
5
70.0
-3.57% chia/timelord/timelord_launcher.py
6
89.04
-8.22% chia/_tests/core/server/test_event_loop.py
7
80.62
-0.84% chia/daemon/server.py
9
86.17
-0.59% chia/wallet/wallet_node.py
11
73.18
-1.28% chia/timelord/timelord.py
26
77.42
-13.36% chia/_tests/core/util/test_lockfile.py
Jobs
ID Job ID Ran Files Coverage
1 23662694873.1 27 Mar 2026 08:35PM UTC 1804
91.16
GitHub Action Run
Source Files on build 23662694873
  • Tree
  • List 902
  • Changed 31
  • Source Changed 4
  • Coverage Changed 30
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #23662694873
  • e826b8d3 on github
  • Prev Build on main (#23648650961)
  • Next Build on main (#23662684159)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc