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

shim: refactor the sugondat rpc client #76

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sugondat-shim/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ subxt = { version = "0.32.1" }
subxt-signer = {version = "0.32.1", features = ["subxt"] }
sha2 = "0.10.8"
hex = "0.4.3"
url = "2.5.0"

[dev-dependencies]
temp-dir = "0.1.11"
2 changes: 1 addition & 1 deletion sugondat-shim/src/dock/rollkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl RollkitRPCServer for RollkitDock {
namespace, height
);
let namespace = parse_namespace(&namespace).map_err(|_| err::bad_namespace())?;
let block_hash = self.client.wait_finalized_height(height).await.unwrap();
let block_hash = self.client.wait_finalized_height(height).await;
let block = self.client.get_block_at(block_hash).await.unwrap();
let mut blobs = vec![];
for blob in block.blobs {
Expand Down
2 changes: 1 addition & 1 deletion sugondat-shim/src/dock/sovereign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl SovereignRPCServer for SovereignDock {
namespace: sugondat_nmt::Namespace,
) -> Result<Block, ErrorObjectOwned> {
info!("get_block({})", height);
let block_hash = self.client.wait_finalized_height(height).await.unwrap();
let block_hash = self.client.wait_finalized_height(height).await;
let block = self.client.get_block_at(block_hash).await.unwrap();
let proof = make_namespace_proof(&block, namespace);
let blobs = block
Expand Down
Loading