Skip to content

Commit

Permalink
Merge pull request #252 from multiversx/remove-meta-check
Browse files Browse the repository at this point in the history
Remove Metachain ID check
  • Loading branch information
mariusmihaic authored Jan 18, 2024
2 parents 225bc17 + 57a0698 commit 2353c69
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions process/elasticproc/logsevents/delegatorsProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ func newDelegatorsProcessor(
}

func (dp *delegatorsProc) processEvent(args *argsProcessEvent) argOutputProcessEvent {
if args.selfShardID != core.MetachainShardId {
return argOutputProcessEvent{}
}

eventIdentifierStr := string(args.event.GetIdentifier())
_, ok := dp.delegatorsOperations[eventIdentifierStr]
if !ok {
Expand Down
4 changes: 0 additions & 4 deletions process/elasticproc/logsevents/esdtIssueProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ func newESDTIssueProcessor(pubkeyConverter core.PubkeyConverter) *esdtIssueProce
}

func (eip *esdtIssueProcessor) processEvent(args *argsProcessEvent) argOutputProcessEvent {
if args.selfShardID != core.MetachainShardId {
return argOutputProcessEvent{}
}

identifierStr := string(args.event.GetIdentifier())
_, ok := eip.issueOperationsIdentifiers[identifierStr]
if !ok {
Expand Down
20 changes: 0 additions & 20 deletions process/elasticproc/logsevents/esdtIssueProcessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,3 @@ func TestIssueESDTProcessor_TransferOwnership(t *testing.T) {
Properties: &data.TokenProperties{},
}, res.tokenInfo)
}

func TestIssueESDTProcessor_EventWithShardID0ShouldBeIgnored(t *testing.T) {
t.Parallel()

esdtIssueProc := newESDTIssueProcessor(&mock.PubkeyConverterMock{})

event := &transaction.Event{
Address: []byte("addr"),
Identifier: []byte(transferOwnershipFunc),
Topics: [][]byte{[]byte("MYTOKEN-abcd"), []byte("my-token"), []byte("MYTOKEN"), []byte(core.NonFungibleESDT), []byte("newOwner")},
}
args := &argsProcessEvent{
timestamp: 1234,
event: event,
selfShardID: 0,
}

res := esdtIssueProc.processEvent(args)
require.False(t, res.processed)
}

0 comments on commit 2353c69

Please sign in to comment.