Skip to content
Snippets Groups Projects
Commit cb9cf43a authored by Benoit Lavenier's avatar Benoit Lavenier Committed by Moul
Browse files

Change duniter-core version

parent 085e5020
Branches
No related tags found
1 merge request!5feat(bma) add `get_written_transactions_for_bma()` and `get_pending_transactions_for_bma()` - close #1
......@@ -474,11 +474,11 @@ pub fn get_txs_history_bma_by_blocks<GvaDb: GvaV1DbReadable>(
let from = from.unwrap_or(0);
let to = to.unwrap_or(u32::MAX);
let start_k = WalletHashWithBnV1Db::new(script_hash, BlockNumber(from));
let end_k = WalletHashWithBnV1Db::new(script_hash, BlockNumber(to.saturating_add(1)));
let end_k = WalletHashWithBnV1Db::new(script_hash, BlockNumber(to));
let sent = gva_db_ro
.txs_by_issuer()
.iter_ref_slice(start_k..end_k, |_k, hashs| {
.iter_ref_slice(start_k..=end_k, |_k, hashs| {
let mut sent = SmallVec::<[GvaTxDbV1; 2]>::new();
for hash in hashs {
if let Some(tx_db) = gva_db_ro.txs().get(HashKeyV2::from_ref(hash))? {
......@@ -492,7 +492,7 @@ pub fn get_txs_history_bma_by_blocks<GvaDb: GvaV1DbReadable>(
let received = gva_db_ro
.txs_by_recipient()
.iter_ref_slice(start_k..end_k, |_k, hashs| {
.iter_ref_slice(start_k..=end_k, |_k, hashs| {
let mut sent = SmallVec::<[GvaTxDbV1; 2]>::new();
for hash in hashs {
if let Some(tx_db) = gva_db_ro.txs().get(HashKeyV2::from_ref(hash))? {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment