Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHIA-1308] Port wallet node RPC endpoints to @marshal decorator #18651

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Quexington
Copy link
Contributor

This is another PR in the same vein as #18593 .

@Quexington Quexington added Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Exclude_Notes Use this label if the changes in the PR should be excluded from the release notes labels Sep 30, 2024
@Quexington Quexington force-pushed the quex.port_wallet_node_endpoints_to_marshal branch from 420fb7f to cc17b41 Compare September 30, 2024 16:39
@Quexington Quexington force-pushed the quex.port_wallet_node_endpoints_to_marshal branch from 646912e to 5dc8efd Compare September 30, 2024 17:19
@Quexington Quexington marked this pull request as ready for review September 30, 2024 21:05
@Quexington Quexington requested a review from a team as a code owner September 30, 2024 21:05
@@ -292,7 +298,10 @@ class PushTransactionsCMD:

async def run(self) -> None:
async with self.rpc_info.wallet_rpc() as wallet_rpc:
await wallet_rpc.client.push_transactions(self.txs_in.transaction_bundle.txs)
# TODO: no default here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm? not clear if this is for later or now or what the needed action is

@@ -694,20 +693,23 @@ async def push_transactions(

interface.side_effects.transactions.extend(inner_action_scope.side_effects.transactions)

return {}
return PushTransactionsResponse([], []) # tx_endpoint takes care of this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fishy to need this if it's pointless?

resp = await client.fetch(
"push_transactions", {"transactions": [tx.to_json_dict_convenience(wallet_node.config)], "fee": 10}
)
assert resp["success"]
resp = await client.fetch("push_transactions", {"transactions": [tx.to_json_dict()], "fee": 10})
resp = await client.fetch("push_transactions", {"transactions": [bytes(tx).hex()], "fee": 10})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we changing the api? or did tx.to_json_dict() create a string before?

@@ -513,8 +518,8 @@ async def test_get_timestamp_for_height(wallet_rpc_environment: WalletRpcTestEnv

await generate_funds(full_node_api, env.wallet_1)

# This tests that the client returns a uint64, rather than raising or returning something unexpected
uint64(await client.get_timestamp_for_height(uint32(1)))
# This tests that the client returns a sucessfully, rather than raising or returning something unexpected
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# This tests that the client returns a sucessfully, rather than raising or returning something unexpected
# This tests that the client returns successfully, rather than raising or returning something unexpected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog Exclude_Notes Use this label if the changes in the PR should be excluded from the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants