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

bump up to 0.10.2 #383

Merged
merged 6 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

WORKDIR /go/src

ARG VERSION=v0.10.1
ARG VERSION=v0.10.2
RUN git clone https://github.com/coinbase/rosetta-cli.git && \
cd rosetta-cli && \
git fetch --all --tags && \
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "Print rosetta-cli version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("v0.10.1")
fmt.Println("v0.10.2")
},
}
14 changes: 13 additions & 1 deletion pkg/processor/balance_storage_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ func NewBalanceStorageHelper(
// Pre-process exemptAccounts on initialization
// to provide fast lookup while syncing.
for _, account := range exemptAccounts {
exemptMap[types.Hash(account)] = struct{}{}
// if users do not specify Currency, we add the address
// by this, all the Currencies in this address will be skipped
if account.Currency == nil {
exemptMap[account.Account.Address] = struct{}{}
} else {
exemptMap[types.Hash(account)] = struct{}{}
}
}

return &BalanceStorageHelper{
Expand Down Expand Up @@ -144,6 +150,12 @@ func (h *BalanceStorageHelper) ExemptFunc() parser.ExemptOperation {
return true
}
}
// if exemptAccounts have the Account address means all the
// currencies in this Account address need to be skipped
_, existsAddress := h.exemptAccounts[op.Account.Address]
if existsAddress {
return existsAddress
}

thisAcct := types.Hash(&types.AccountCurrency{
Account: op.Account,
Expand Down