mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 02:24:23 -05:00
Fixed missing partial count was incorrectly incremented on solo plotNFT farming (#18346)
* Fixed an issue where missing partial count was incorrectly incremented on solo plotNFT farming * Updated test
This commit is contained in:
@@ -349,18 +349,19 @@ def test_increment_pool_stats(case: IncrementPoolStatsCase) -> None:
|
||||
"points_acknowledged_since_start": 0,
|
||||
"points_acknowledged_24h": [],
|
||||
"pool_errors_24h": [],
|
||||
"valid_partials_since_start": 0,
|
||||
"valid_partials_24h": [],
|
||||
"valid_partials_since_start": 1,
|
||||
"valid_partials_24h": [1],
|
||||
"invalid_partials_since_start": 0,
|
||||
"invalid_partials_24h": [],
|
||||
"insufficient_partials_since_start": 0,
|
||||
"insufficient_partials_24h": [],
|
||||
"stale_partials_since_start": 0,
|
||||
"stale_partials_24h": [],
|
||||
"missing_partials_since_start": 1,
|
||||
"missing_partials_24h": [1],
|
||||
"missing_partials_since_start": 0,
|
||||
"missing_partials_24h": [],
|
||||
},
|
||||
),
|
||||
# Empty pool_url means solo plotNFT farming
|
||||
id="empty_pool_url",
|
||||
),
|
||||
pytest.param(
|
||||
|
||||
@@ -185,16 +185,13 @@ class FarmerAPI:
|
||||
pool_state_dict: Dict[str, Any] = self.farmer.pool_state[p2_singleton_puzzle_hash]
|
||||
pool_url = pool_state_dict["pool_config"].pool_url
|
||||
if pool_url == "":
|
||||
# `pool_url == ""` means solo plotNFT farming
|
||||
increment_pool_stats(
|
||||
self.farmer.pool_state,
|
||||
p2_singleton_puzzle_hash,
|
||||
"missing_partials",
|
||||
"valid_partials",
|
||||
time.time(),
|
||||
)
|
||||
self.farmer.state_changed(
|
||||
"failed_partial",
|
||||
{"p2_singleton_puzzle_hash": p2_singleton_puzzle_hash.hex()},
|
||||
)
|
||||
return
|
||||
|
||||
if pool_state_dict["current_difficulty"] is None:
|
||||
|
||||
Reference in New Issue
Block a user