add serialization/deserialization react transaction#50
Open
MichelMajdalani wants to merge 6 commits intodeso-protocol:mainfrom
Open
add serialization/deserialization react transaction#50MichelMajdalani wants to merge 6 commits intodeso-protocol:mainfrom
MichelMajdalani wants to merge 6 commits intodeso-protocol:mainfrom
Conversation
Code-Milker
reviewed
Mar 8, 2022
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
lazynina
requested changes
Mar 8, 2022
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
…ichelmajdalani/first-core-change
lazynina
requested changes
Apr 18, 2022
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| func (bav *UtxoView) GetReactionsForPostHash(postHash *BlockHash) (_ReactorPubKeys [][]byte, _err error) { | ||
| if bav.Postgres != nil { |
Member
There was a problem hiding this comment.
we should refactor this function to use the DbAdapter to get the reactions from the db and only update the view if the key constructed from the entry does not exist in the view yet. Otherwise, we risk updating entries in the view that haven't been flushed.
for-developers/walkthrough/dev-setup/making-your-first-changes.md
Outdated
Show resolved
Hide resolved
| // increment the react s on the react d post. | ||
| reactEntry := &ReactionEntry{ | ||
| ReactorPubKey: txn.PublicKey, | ||
| ReactedPostHash: txMeta.PostHash, |
Member
There was a problem hiding this comment.
need to add ReactEmoji in here
| require.NoError(utxoView.FlushToDb()) | ||
| } | ||
|
|
||
| testDisconnectedState() |
Member
There was a problem hiding this comment.
I would probably use the TestMeta struct and follow the pattern used in block_view_dao_coin_limit_order_test.go.
Using the below at the end of your tests ensures all disconnect / connects work in all different forms:
_rollBackTestMetaTxnsAndFlush(testMeta)
_applyTestMetaTxnsToMempool(testMeta)
_applyTestMetaTxnsToViewAndFlush(testMeta)
_disconnectTestMetaTxnsFromViewAndFlush(testMeta)
_connectBlockThenDisconnectBlockAndFlush(testMeta)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add documentation for the first core change of supporting reactions to posts.