Skip to content

Commit

Permalink
ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-o-how committed Nov 14, 2024
1 parent b500daa commit e8b3219
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions chia/_tests/clvm/test_member_puzzles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
PuzzleWithRestrictions,
Restriction,
)
from chia.wallet.puzzles.custody.member_puzzles.member_puzzles import BLSMember, PasskeyMember, SECPR1Member, SECPK1Member
from chia.wallet.puzzles.custody.member_puzzles.member_puzzles import (
BLSMember,
PasskeyMember,
SECPR1Member,
SECPK1Member,
)
from chia.wallet.wallet_spend_bundle import WalletSpendBundle


Expand Down Expand Up @@ -356,6 +361,7 @@ async def test_secp256r1_member(cost_logger: CostLogger) -> None:
await sim.farm_block()
await sim.rewind(block_height)


@pytest.mark.anyio
async def test_secp256k1_member(cost_logger: CostLogger) -> None:
async with sim_and_client() as (sim, client):
Expand Down Expand Up @@ -426,4 +432,4 @@ async def test_secp256k1_member(cost_logger: CostLogger) -> None:
)
assert result == (MempoolInclusionStatus.SUCCESS, None)
await sim.farm_block()
await sim.rewind(block_height)
await sim.rewind(block_height)
3 changes: 2 additions & 1 deletion chia/wallet/puzzles/custody/member_puzzles/member_puzzles.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def puzzle(self, nonce: int) -> Program:
def puzzle_hash(self, nonce: int) -> bytes32:
return self.puzzle(nonce).get_tree_hash()


@dataclass(frozen=True)
class SECPK1Member(Puzzle):
secp_pk: bytes
Expand All @@ -96,4 +97,4 @@ def puzzle(self, nonce: int) -> Program:
return SECPK1_MEMBER_MOD.curry(self.secp_pk)

def puzzle_hash(self, nonce: int) -> bytes32:
return self.puzzle(nonce).get_tree_hash()
return self.puzzle(nonce).get_tree_hash()

0 comments on commit e8b3219

Please sign in to comment.