Skip to content

Commit

Permalink
[CHIA-1696] Show an INCOMING_TX for pool reward claims (#18887)
Browse files Browse the repository at this point in the history
* Show an `INCOMING_TX` for pool reward claims

* The last thing worked, but not really
  • Loading branch information
Quexington authored Nov 19, 2024
1 parent 1c12526 commit 3bc2fbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions chia/_tests/pools/test_pool_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from chia.util.ints import uint32, uint64
from chia.wallet.derive_keys import find_authentication_sk, find_owner_sk
from chia.wallet.transaction_record import TransactionRecord
from chia.wallet.util.transaction_type import TransactionType
from chia.wallet.util.tx_config import DEFAULT_TX_CONFIG
from chia.wallet.util.wallet_types import WalletType
from chia.wallet.wallet_node import WalletNode
Expand Down Expand Up @@ -444,6 +445,16 @@ async def test_absorb_self(
await full_node_api.farm_blocks_to_puzzlehash(count=2, farm_to=our_ph, guarantee_transaction_blocks=True)
await full_node_api.wait_for_wallet_synced(wallet_node=wallet_node, timeout=20)
await full_node_api.check_transactions_confirmed(wallet_node.wallet_state_manager, absorb_txs)
assert (
len(
[
tx
for tx in await wallet_node.wallet_state_manager.tx_store.get_all_transactions()
if TransactionType(tx.type) is TransactionType.INCOMING_TX and tx.amount == 1_750_000_000_000
]
)
== 2
)
new_status: PoolWalletInfo = (await client.pw_status(2))[0]
assert status.current == new_status.current
assert status.tip_singleton_coin_id != new_status.tip_singleton_coin_id
Expand Down
2 changes: 1 addition & 1 deletion chia/pools/pool_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ async def claim_pool_rewards(
confirmed=False,
sent=uint32(0),
spend_bundle=claim_spend,
additions=claim_spend.additions(),
additions=[add for add in claim_spend.additions() if add.amount == last_solution.coin.amount],
removals=claim_spend.removals(),
wallet_id=uint32(self.wallet_id),
sent_to=[],
Expand Down

0 comments on commit 3bc2fbf

Please sign in to comment.