forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use SuiClient instead of RPCGatewayClient in Sui CLI (MystenLabs#3373)
* Refactor GatewayClient and SuiClient Enhance Sui SDK apis * update import and SDK docs * revert rename to reduce PR size * more gateway deps clean up * fixup after rebase
- Loading branch information
1 parent
0938aa9
commit 4a1f5ef
Showing
35 changed files
with
563 additions
and
697 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2022, Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use crate::{Config, ValidatorInfo}; | ||
use serde::Deserialize; | ||
use serde::Serialize; | ||
use std::path::PathBuf; | ||
use std::time::Duration; | ||
use sui_types::committee::EpochId; | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct GatewayConfig { | ||
pub epoch: EpochId, | ||
pub validator_set: Vec<ValidatorInfo>, | ||
pub send_timeout: Duration, | ||
pub recv_timeout: Duration, | ||
pub buffer_size: usize, | ||
pub db_folder_path: PathBuf, | ||
} | ||
|
||
impl Config for GatewayConfig {} | ||
|
||
impl Default for GatewayConfig { | ||
fn default() -> Self { | ||
Self { | ||
epoch: 0, | ||
validator_set: vec![], | ||
send_timeout: Duration::from_micros(4000000), | ||
recv_timeout: Duration::from_micros(4000000), | ||
buffer_size: 650000, | ||
db_folder_path: Default::default(), | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.