From f8c5e0a0afdfeeedcc6bccc18f5c0e517169b892 Mon Sep 17 00:00:00 2001 From: librelois Date: Sat, 15 May 2021 18:24:59 +0200 Subject: [PATCH] deps: update duniter-core --- Cargo.lock | 18 +++++++++--------- db/src/lib.rs | 24 ++++++++++++------------ dbs-reader/src/idty.rs | 6 ++++++ gql/src/queries/idty.rs | 1 + 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0bb4b30..7eefce4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -772,7 +772,7 @@ dependencies = [ [[package]] name = "duniter-bc-reader" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "anyhow", "dubp", @@ -818,7 +818,7 @@ dependencies = [ [[package]] name = "duniter-conf" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "anyhow", "dubp", @@ -832,7 +832,7 @@ dependencies = [ [[package]] name = "duniter-core" version = "1.8.1" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "duniter-bc-reader", "duniter-conf", @@ -845,7 +845,7 @@ dependencies = [ [[package]] name = "duniter-dbs" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "arrayvec 0.7.0", "bincode", @@ -868,7 +868,7 @@ dependencies = [ [[package]] name = "duniter-dbs-write-ops" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "chrono", "dubp", @@ -883,7 +883,7 @@ dependencies = [ [[package]] name = "duniter-global" version = "1.8.1" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "async-rwlock", "dubp", @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "duniter-mempools" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "dubp", "duniter-bc-reader", @@ -1031,7 +1031,7 @@ dependencies = [ [[package]] name = "duniter-module" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "anyhow", "async-mutex", @@ -1602,7 +1602,7 @@ dependencies = [ [[package]] name = "kv_typed" version = "0.1.0" -source = "git+https://git.duniter.org/nodes/rust/duniter-core#116bdbe459f3eaabd14fe0611527379689385d6f" +source = "git+https://git.duniter.org/nodes/rust/duniter-core#4ce40a98dbc3cb3241e6d91817a8753a9be95ee8" dependencies = [ "byteorder", "cfg-if 0.1.10", diff --git a/db/src/lib.rs b/db/src/lib.rs index 590f11e..849241d 100644 --- a/db/src/lib.rs +++ b/db/src/lib.rs @@ -51,29 +51,29 @@ pub(crate) use std::collections::BTreeSet; db_schema!( GvaV1, [ + ["balances", Balances, WalletConditionsV2, SourceAmountValV2], ["blocks_by_common_time", BlocksByCommonTime, U64BE, u32], ["blocks_with_ud", BlocksWithUd, U32BE, ()], ["blockchain_time", BlockchainTime, U32BE, u64], ["blocks_chunk_hash", BlocksChunkHash, U32BE, HashDb], ["compressed_blocks_chunk", CompressedBlocksChunk, U32BE, Vec], ["current_blocks_chunk", CurrentBlocksChunk, U32BE, GvaBlockDbV1], - ["txs", Txs, HashKeyV2, GvaTxDbV1], - ["txs_by_block", TxsByBlock, U32BE, Vec], - ["txs_by_issuer", TxsByIssuer, WalletHashWithBnV1Db, BTreeSet], - ["txs_by_recipient", TxsByRecipient, WalletHashWithBnV1Db, BTreeSet], - [ - "scripts_by_pubkey", - ScriptsByPubkey, - PubKeyKeyV2, - WalletScriptArrayV2 - ], + ["gva_identities", GvaIdentities, PubKeyKeyV2, GvaIdtyDbV1], [ "gva_utxos", GvaUtxos, GvaUtxoIdDbV1, SourceAmountValV2 ], - ["balances", Balances, WalletConditionsV2, SourceAmountValV2], - ["gva_identities", GvaIdentities, PubKeyKeyV2, GvaIdtyDbV1], + [ + "scripts_by_pubkey", + ScriptsByPubkey, + PubKeyKeyV2, + WalletScriptArrayV2 + ], + ["txs", Txs, HashKeyV2, GvaTxDbV1], + ["txs_by_block", TxsByBlock, U32BE, Vec], + ["txs_by_issuer", TxsByIssuer, WalletHashWithBnV1Db, BTreeSet], + ["txs_by_recipient", TxsByRecipient, WalletHashWithBnV1Db, BTreeSet], ] ); diff --git a/dbs-reader/src/idty.rs b/dbs-reader/src/idty.rs index 705bca3..13d4097 100644 --- a/dbs-reader/src/idty.rs +++ b/dbs-reader/src/idty.rs @@ -31,6 +31,8 @@ impl DbsReaderImpl { #[cfg(test)] mod tests { use super::*; + use dubp::common::prelude::Blockstamp; + use dubp::crypto::keys::ed25519::Signature; use duniter_core::dbs::databases::bc_v2::BcV2DbWritable; #[test] @@ -52,7 +54,9 @@ mod tests { bc_db.identities_write().upsert( PubKeyKeyV2(pk), duniter_core::dbs::IdtyDbV2 { + created_on: Blockstamp::default(), is_member: true, + signature: Signature::default(), username: String::from("JohnDoe"), }, )?; @@ -60,7 +64,9 @@ mod tests { assert_eq!( db_reader.idty(&bc_db_ro, pk)?, Some(duniter_core::dbs::IdtyDbV2 { + created_on: Blockstamp::default(), is_member: true, + signature: Signature::default(), username: String::from("JohnDoe"), }) ); diff --git a/gql/src/queries/idty.rs b/gql/src/queries/idty.rs index b2117f6..65b43b1 100644 --- a/gql/src/queries/idty.rs +++ b/gql/src/queries/idty.rs @@ -58,6 +58,7 @@ mod tests { Ok(Some(duniter_core::dbs::IdtyDbV2 { is_member: true, username: String::from("JohnDoe"), + ..Default::default() })) }); let schema = create_schema(MockAsyncAccessor::new(), dbs_reader)?;