cspr-rad / kairos

Apache License 2.0
4 stars 0 forks source link

kairos-cli: implement call to deposit endpoint and integration test #91

Closed marijanp closed 5 months ago

marijanp commented 5 months ago

Things done

Overview

92

Motivation

-

Rom3dius commented 5 months ago

I'm a little confused as to why you're spawning a tokio runtime to use reqwests async API in a CLI application when reqwest has a blocking API and the nature of a CLI is generally synchronous.

Let's merge it, just leaving this comment here for future reference and to make everyone aware of reqwests blocking API.

koxu1996 commented 5 months ago

I'm a little confused as to why you're spawning a tokio runtime to use reqwests async API in a CLI application when reqwest has a blocking API and the nature of a CLI is generally synchronous.

Let's merge it, just leaving this comment here for future reference and to make everyone aware of reqwests blocking API.

@Rom3dius that's right! CLI client (replaced with Rust SDK in the future) should be synchronous, not only for simplicity, but there is no advantage of having async there. @marijanp could you use reqwest::blocking?

marijanp commented 5 months ago

@Rom3dius @koxu1996 I began writing the client with potentially factoring it out in a separate crate, so I decided to make it async as they usually don't block but do so in our CLI. But it might just be premature optimization. so I will make this blocking.

github-actions[bot] commented 5 months ago

File Coverage
All files 53% :x:
kairos-tx/src/asn.rs 48% :x:
kairos-tx/src/error.rs 0% :x:
kairos-server/src/state/transactions/batch_state.rs 42% :x:
kairos-crypto/src/implementations/casper.rs 6% :x:
kairos-server/src/state/transactions.rs 40% :x:
kairos-server/src/state/trie.rs 35% :x:
kairos-server/src/config.rs 0% :x:
kairos-server/src/errors.rs 12% :x:
kairos-server/src/lib.rs 95% :white_check_mark:
kairos-server/src/state.rs 90% :white_check_mark:
kairos-server/src/utils.rs 22% :x:
kairos-test-utils/src/cctl/parsers.rs 66% :white_check_mark:
kairos-test-utils/src/cctl.rs 87% :white_check_mark:
kairos-server/src/routes/deposit.rs 88% :white_check_mark:
kairos-server/src/routes/transfer.rs 90% :white_check_mark:
kairos-server/tests/transactions.rs 85% :white_check_mark:

Minimum allowed coverage is 60%

Generated by :monkey: cobertura-action against 1da52086a0839defc3fc02f42108566e92df052a