-
Notifications
You must be signed in to change notification settings - Fork 11
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
Mx 16271 indexing incoming tokens #325
Mx 16271 indexing incoming tokens #325
Conversation
# Conflicts: # integrationtests/valuesIndex_test.go
scripts/script.sh
Outdated
@@ -1,4 +1,5 @@ | |||
IMAGE_NAME=elastic-container | |||
IMAGE_NAME_2=elastic-container-2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps another name?
@@ -23,3 +23,9 @@ | |||
username = "" | |||
password = "" | |||
bulk-request-max-size-in-bytes = 4194304 # 4MB | |||
|
|||
[config.main-chain-elastic-cluster] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can add a comment here to describe for what is used this section of config
@@ -75,6 +79,9 @@ func (mrtc *managedRunTypeComponents) CheckSubcomponents() error { | |||
if check.IfNil(mrtc.rewardTxData) { | |||
return transactions.ErrNilRewardTxDataHandler | |||
} | |||
if check.IfNil(mrtc.indexTokensHandler) { | |||
return transactions.ErrNilIndexTokensHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should move transactions.ErrNilIndexTokensHandler
in another package, because it is not relayed with the transactions package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to dataIndexer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should rename the file in disalbedIndexTokensHandler or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
return "" | ||
} | ||
|
||
func (sit *sovereignIndexTokensHandler) indexNewTokens(responseTokensInfo []data.ResponseTokenInfoDB, buffSlice *data.BufferSlice) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you can rename this function in serializeNewTokens
@@ -33,6 +31,8 @@ type ArgsIndexerFactory struct { | |||
UseKibana bool | |||
ImportDB bool | |||
Sovereign bool | |||
ESDTPrefix string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from where do you read the value of this parameter ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added parameter in config.toml
return nil, err | ||
} | ||
|
||
func NewMainChainElasticClient(esClient elasticproc.DatabaseClientHandler, indexingEnabled bool) (*mainChainElasticClient, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add check.ifNil for esClient
and return error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Proposed changes
IndexTokensHandler
Testing procedure