Skip to content

Commit

Permalink
fixup! Sync with 'main'
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Sep 20, 2022
1 parent da80f3d commit 8b3b140
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ borsh = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4
borsh-derive = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-schema-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
# The following 3 crates patch a work-around for https://github.com/smol-rs/polling/issues/38 breaking namada tooling build with nightly 2022-05-20
polling = {git = "https://github.com/heliaxdev/polling.git", rev = "02a655775282879459a3460e2646b60c005bca2c"}
async-io = {git = "https://github.com/heliaxdev/async-io.git", rev = "9285dad39c9a37ecd0dbd498c5ce5b0e65b02489"}
async-process = {git = "https://github.com/heliaxdev/async-process.git", rev = "e42c527e87d937da9e01aaeb563c0b948580dc89"}
# borsh = {path = "../borsh-rs/borsh"}
# borsh-derive = {path = "../borsh-rs/borsh-derive"}
# borsh-derive-internal = {path = "../borsh-rs/borsh-derive-internal"}
Expand Down
6 changes: 2 additions & 4 deletions apps/src/lib/node/ledger/tendermint_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,9 @@ pub fn reset(tendermint_dir: impl AsRef<Path>) -> Result<()> {
/// Convert a common signing scheme validator key into JSON for
/// Tendermint
fn validator_key_to_json(
address: &Address,
sk: &common::SecretKey,
) -> std::result::Result<serde_json::Value, ParseSecretKeyError> {
let address = address.raw_hash().unwrap();

let raw_hash = tm_consensus_key_raw_hash(&sk.ref_to());
let (id_str, pk_arr, kp_arr) = match sk {
common::SecretKey::Ed25519(_) => {
let sk_ed: ed25519::SecretKey = sk.try_to_sk().unwrap();
Expand All @@ -211,7 +209,7 @@ fn validator_key_to_json(
};

Ok(json!({
"address": address,
"address": raw_hash,
"pub_key": {
"type": format!("tendermint/PubKey{}",id_str),
"value": base64::encode(pk_arr),
Expand Down
2 changes: 1 addition & 1 deletion shared/src/ledger/storage_api/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub enum Error {
/// Result of a storage API call.
pub type Result<T> = std::result::Result<T, Error>;

/// Result extension to easily wrap custom errors into [`Error`].
/// Result extension to easily wrap custom errors into [`enum@Error`].
// This is separate from `ResultExt`, because the implementation requires
// different bounds for `T`.
pub trait ResultExt<T> {
Expand Down
24 changes: 12 additions & 12 deletions wasm_for_tests/wasm_source/Cargo.lock

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

0 comments on commit 8b3b140

Please sign in to comment.