integration with jsonrpsee v2 (#214)

* hacky integration with jsonrpsee v2

* stray todos

* fmt

* add http support

* make test build compile

* Update src/rpc.rs

* bring back set_client

* use crates.io version jsonrpsee

* WIP: workaround for embedded subxt client (#236)

* workaround for embedded subxt client

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* increase default channel size on subxt client

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* remove client tests due to inference problem on From

Signed-off-by: Gregory Hill <gregorydhill@outlook.com>

* add comments for missing impls

* more verbose errors

* make subscription notifs buffer bigger

* fmt

Co-authored-by: Greg Hill <gregorydhill@outlook.com>
This commit is contained in:
Niklas Adolfsson
2021-03-08 11:52:23 +01:00
committed by GitHub
parent c4405c40ad
commit a920e34c20
8 changed files with 393 additions and 207 deletions
+1 -7
View File
@@ -14,10 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
use jsonrpsee::{
client::RequestError,
transport::ws::WsNewDnsError,
};
use jsonrpsee_types::error::Error as RequestError;
use sp_core::crypto::SecretStringError;
use sp_runtime::{
transaction_validity::TransactionValidityError,
@@ -42,9 +39,6 @@ pub enum Error {
/// Rpc error.
#[error("Rpc error: {0}")]
Rpc(#[from] RequestError),
/// Error that can happen during the initial websocket handshake
#[error("Rpc error: {0}")]
WsHandshake(#[from] WsNewDnsError),
/// Serde serialization error
#[error("Serde json error: {0}")]
Serialization(#[from] serde_json::error::Error),