Prefix root keys in coordinator with "coordinator" to prevent conflicts with tributary

This commit is contained in:
Luke Parker
2023-09-01 01:00:24 -04:00
parent fda90e23c9
commit 2ad6b38be9
3 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ impl<'a, D: Db> MainDb<'a, D> {
} }
fn main_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> { fn main_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> {
D::key(b"MAIN", dst, key) D::key(b"coordinator_main", dst, key)
} }
fn acive_tributaries_key() -> Vec<u8> { fn acive_tributaries_key() -> Vec<u8> {

View File

@@ -8,7 +8,7 @@ impl<D: Db> SubstrateDb<D> {
} }
fn substrate_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> { fn substrate_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> {
D::key(b"SUBSTRATE", dst, key) D::key(b"coordinator_substrate", dst, key)
} }
fn block_key() -> Vec<u8> { fn block_key() -> Vec<u8> {

View File

@@ -57,7 +57,7 @@ impl<D: Db> TributaryDb<D> {
} }
fn tributary_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> { fn tributary_key(dst: &'static [u8], key: impl AsRef<[u8]>) -> Vec<u8> {
D::key(b"TRIBUTARY", dst, key) D::key(b"coordinator_tributary", dst, key)
} }
fn block_key(genesis: [u8; 32]) -> Vec<u8> { fn block_key(genesis: [u8; 32]) -> Vec<u8> {