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

stream blocks #176

Merged
merged 11 commits into from
Nov 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
contains accounts
anjor committed Nov 5, 2024
commit 0af7f33974e16ee423026090b37b611ed38d44f0
16 changes: 1 addition & 15 deletions grpc-server.go
Original file line number Diff line number Diff line change
@@ -668,19 +668,5 @@ func (multi *MultiEpoch) StreamBlocks(params *old_faithful_grpc.StreamBlocksRequ
}

func blockContainsAccounts(block *old_faithful_grpc.BlockResponse, accounts []string) bool {
accountSet := make(map[string]struct{}, len(accounts))
for _, acc := range accounts {
accountSet[acc] = struct{}{}
}

for _, tx := range block.Transactions {
for _, acc := range tx.Transation.Message.AccountKeys {
if _, exists := accountSet[string(acc)]; exists {
return true
}
}

}

return false
return true // to do
}