Modify SqlMerkleRadixStore for generic Postgres
This change modifies the SqlMerkleRadixStore implementation over Postgres
backends.  This will support either Postgres backend implementations.
@@ -19,7 +19,7 @@ use diesel::pg::PgConnection;
use crate::error::InternalError;
use crate::state::merkle::node::Node;
-use crate::state::merkle::sql::backend::{Connection, Execute, PostgresBackend};
+use crate::state::merkle::sql::backend::{Backend, Connection, Execute};
use super::operations::delete_tree::MerkleRadixDeleteTreeOperation as _;
use super::operations::get_leaves::MerkleRadixGetLeavesOperation as _;
@@ -34,7 +34,11 @@ use super::operations::write_changes::MerkleRadixWriteChangesOperation as _;
use super::operations::MerkleRadixOperations;
use super::{MerkleRadixStore, SqlMerkleRadixStore, TreeUpdate};
-impl<'b> MerkleRadixStore for SqlMerkleRadixStore<'b, PostgresBackend, PgConnection> {
+impl<'b, B> MerkleRadixStore for SqlMerkleRadixStore<'b, B, PgConnection>
+where
+ B: Backend + Execute,
+ <B as Backend>::Connection: Connection<ConnectionType = PgConnection>,
+{
fn get_or_create_tree(
&self,
tree_name: &str,
