Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Check if anchor exists if 0 operations processed #1106

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

bstasyszyn
Copy link
Contributor

If the transaction processor determines that all of the operations in the batch are already in local storage then a check is made to see if the anchor is also store. If so, the anchor will not be processed again. (This is most likely due do multiple Announce activities announcing the same anchor event.)

closes #1104

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

If the transaction processor determines that all of the operations in the batch are already in local storage then a check is made to see if the anchor is also store. If so, the anchor will not be processed again. (This is most likely due do multiple Announce activities announcing the same anchor event.)

closes trustbloc#1104

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Feb 7, 2022
@codecov
Copy link

codecov bot commented Feb 7, 2022

Codecov Report

Merging #1106 (7e2cf6c) into main (74ea409) will decrease coverage by 0.00%.
The diff coverage is 91.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1106      +/-   ##
==========================================
- Coverage   89.29%   89.28%   -0.01%     
==========================================
  Files         161      161              
  Lines       15791    15823      +32     
==========================================
+ Hits        14100    14127      +27     
- Misses       1037     1040       +3     
- Partials      654      656       +2     
Impacted Files Coverage Δ
...ctivitypub/service/activityhandler/inboxhandler.go 84.30% <87.50%> (+0.08%) ⬆️
...vitypub/service/anchorsynctask/activitysynctask.go 87.70% <89.28%> (+0.13%) ⬆️
pkg/observer/observer.go 83.26% <92.00%> (+0.96%) ⬆️
pkg/versions/1_0/txnprocessor/txnprocessor.go 100.00% <100.00%> (ø)
pkg/activitypub/service/monitoring/monitoring.go 77.35% <0.00%> (-2.84%) ⬇️
pkg/observer/pubsub.go 94.49% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74ea409...7e2cf6c. Read the comment docs.

@bstasyszyn bstasyszyn merged commit b8ebb90 into trustbloc:main Feb 7, 2022
@bstasyszyn bstasyszyn deleted the 1104-2 branch February 7, 2022 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if anchor has already been processed if no operations processed
3 participants