Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
duniter-gva
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
rust
modules
duniter-gva
Commits
cb9cf43a
Commit
cb9cf43a
authored
2 years ago
by
Benoit Lavenier
Committed by
Moul
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change duniter-core version
parent
085e5020
Branches
Branches containing commit
No related tags found
1 merge request
!5
feat(bma) add `get_written_transactions_for_bma()` and `get_pending_transactions_for_bma()` - close #1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbs-reader/src/txs_history.rs
+3
-3
3 additions, 3 deletions
dbs-reader/src/txs_history.rs
with
3 additions
and
3 deletions
dbs-reader/src/txs_history.rs
+
3
−
3
View file @
cb9cf43a
...
...
@@ -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
))
?
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment