Skip to content

Commit

Permalink
Merge pull request #139 from citahub/regenerate_rs_from_proto
Browse files Browse the repository at this point in the history
update proto and regenerate rs
  • Loading branch information
rink1969 committed Apr 3, 2020
2 parents a201f35 + 5d2dcc4 commit cfb1aa7
Show file tree
Hide file tree
Showing 5 changed files with 1,328 additions and 724 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "cita-tool/proto"]
path = cita-tool/proto
url = https://github.com/cryptape/cita-proto.git
url = https://github.com/citahub/cita-proto.git
2 changes: 1 addition & 1 deletion cita-tool/Cargo.toml
Expand Up @@ -11,7 +11,7 @@ futures = "^0.1"
serde_json = "^1.0.17"
serde = "^1.0.53"
serde_derive = "^1.0.53"
protobuf = "^2.0.2"
protobuf = "=2.8.1"
hex = "^0.3.2"
tiny-keccak = "^1.4.2"
secp256k1 = { version = "0.15.0", features = ["recovery"]}
Expand Down
2 changes: 1 addition & 1 deletion cita-tool/proto
4 changes: 2 additions & 2 deletions cita-tool/src/protos.rs
Expand Up @@ -58,7 +58,7 @@ impl UnverifiedTransaction {
let sig = Signature::from(signature);

match self.get_crypto() {
Crypto::SECP => sig.recover(&hash),
Crypto::DEFAULT => sig.recover(&hash),
_ => Err("Mismatched encryption algorithm".to_string()),
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ impl Transaction {
unverified_tx.set_transaction(self.clone());
let signature = sign(&sk, &hash);
unverified_tx.set_signature(signature.to_vec());
unverified_tx.set_crypto(Crypto::SECP);
unverified_tx.set_crypto(Crypto::DEFAULT);
unverified_tx
}
}
Expand Down

0 comments on commit cfb1aa7

Please sign in to comment.