Feature/various improvements (#1282)

* Added abci::Data field to ExecuteResult

* optional serde support for ed25519 keys

* optional serde support for x25519 keys

* actually calling dotenv at validator API startup

* Added STATE_DENOM network specific constant

* unit test fixes
This commit is contained in:
Jędrzej Stuczyński
2022-05-24 10:52:00 +02:00
committed by GitHub
parent d7920a4f50
commit 7d82fe0c0d
17 changed files with 163 additions and 13 deletions
+4 -1
View File
@@ -121,7 +121,10 @@ mod test {
.to_base58_string(),
)
.unwrap(),
encryption::KeyPair::new(&mut rng).private_key().clone(),
encryption::PrivateKey::from_bytes(
&encryption::KeyPair::new(&mut rng).private_key().to_bytes(),
)
.unwrap(),
);
let (_, blind_sign_req) = prepare_blind_sign(
&params,
+8 -2
View File
@@ -146,7 +146,10 @@ async fn signed_before() {
.to_base58_string(),
)
.unwrap(),
encryption::KeyPair::new(&mut rng).private_key().clone(),
encryption::PrivateKey::from_bytes(
&encryption::KeyPair::new(&mut rng).private_key().to_bytes(),
)
.unwrap(),
);
let (_, blind_sign_req) = prepare_blind_sign(
&params,
@@ -342,7 +345,10 @@ async fn blind_sign_correct() {
.to_base58_string(),
)
.unwrap(),
encryption::KeyPair::new(&mut rng).private_key().clone(),
encryption::PrivateKey::from_bytes(
&encryption::KeyPair::new(&mut rng).private_key().to_bytes(),
)
.unwrap(),
);
let key_pair = ttp_keygen(&params, 1, 1).unwrap().remove(0);
+2
View File
@@ -590,6 +590,8 @@ async fn run_validator_api(matches: ArgMatches<'static>) -> Result<()> {
async fn main() -> Result<()> {
println!("Starting validator api...");
dotenv::dotenv()?;
cfg_if::cfg_if! {if #[cfg(feature = "console-subscriber")] {
// instriment tokio console subscriber needs RUSTFLAGS="--cfg tokio_unstable" at build time
console_subscriber::init();