Skip to content

Commit df85ac7

Browse files
committed
fix test_rollback()
1 parent 5d9683b commit df85ac7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

chia/_tests/core/full_node/stores/test_coin_store.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,20 +252,20 @@ async def test_rollback(db_version: int, bt: BlockTools) -> None:
252252
if block.height != 0 and selected_coin is None:
253253
# Select the first CoinRecord which will be spent at the next transaction block.
254254
selected_coin = records[0]
255-
await coin_store._set_spent([r.name for r in records[1:] if r is not None], block.height)
255+
await coin_store._set_spent([r.name() for r in records[1:] if r is not None], block.height)
256256
else:
257-
await coin_store._set_spent([r.name for r in records if r is not None], block.height)
257+
await coin_store._set_spent([r.name() for r in records if r is not None], block.height)
258258

259259
if spend_selected_coin:
260260
assert selected_coin is not None
261-
await coin_store._set_spent([selected_coin.name], block.height)
261+
await coin_store._set_spent([selected_coin.name()], block.height)
262262

263263
records = [await coin_store.get_coin_record(coin.name()) for coin in reward_coins] # update coin records
264264
for record in records:
265265
assert record is not None
266266
if (
267267
selected_coin is not None
268-
and selected_coin.name == record.name()
268+
and selected_coin.name() == record.name()
269269
and not selected_coin.confirmed_block_index < block.height
270270
):
271271
assert not record.spent()

0 commit comments

Comments
 (0)